Be more specific. Where are those listboxes? Are they on Outlook forms or a
VB form or what? Did you change any binding on those controls if they are on
Outlook forms?

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
I make a mistake...I write that I use listboxes....but I use comboboxes.
Here is more details
The combobox are place on a outlook forms.
Here is the code I use to create the toolbar on creation of a new inspector
Private Sub colInsp_NewInspector(ByVal Inspector As Outlook.Inspector)
On Error GoTo ERRH_colInsp_NewInspector
Dim objToolBar As CommandBar
Dim cbClient As CommandBarComboBox
Dim strSub As String
Dim sngStep As Single
'----------------------------
strSub = strModule & "colInsp_NewInspector"
AddInsp Inspector
Err.Clear
On Error Resume Next
Set objToolBar = Inspector.CommandBars.Item("PlombcoAssocieClient")
If Err.Number = "" Then
objToolBar.Delete
End If
Err.Clear
On Error GoTo ERRH_colInsp_NewInspector
Set objToolBar = Inspector.CommandBars.Add("PlombcoAssocieClient",
msoBarTop, , False)
'*********************************************************
' CREATION OF THE FIRST COMBOBOX
'*********************************************************
Set objCBCBClient = objToolBar.Controls.Add(Type:=msoControlComboBox)
objCBCBClient.Tag = "Client"
' Ajouter la liste de Client dans le ComboBox
RemplirComboBox objCBCBClient
objCBCBClient.Width = 300
objCBCBClient.OnAction = "<!" & gstrProgID & ">"
objCBCBClient.Caption = "Client"
'*********************************************************
' CREATION OF THE SECOND COMBOBOX
'*********************************************************
' Ajouter la liste de contact des clients
Set cbClient = objToolBar.Controls.Add(Type:=msoControlComboBox)
cbClient.Tag = "Contact"
cbClient.Width = 300
'cbClient.OnAction = "" '******** THERE IS NO ACTION FOR THIS COMBOBOX
cbClient.Caption = "Contact"
'*********************************************************
' CREATION OF THE FIRST BUTTON...THERE IS NO PROBLEM
'*********************************************************
' Ajouter le bouton Associer et Deplacer
Set objCBBAssocier = objToolBar.Controls.Add(Type:=msoControlButton)
objCBBAssocier.Tag = "Associer"
objCBBAssocier.Caption = "Associer et d?placer"
objCBBAssocier.OnAction = "<!" & gstrProgID & ">"
objCBBAssocier.ToolTipText = "Associer l'item ? un contact"
'*********************************************************
' CREATION OF THE SECOND BUTTON...THERE IS NO PROBLEM
'*********************************************************
' Ajouter le bouton qui permet de remettre a zero les Combobox
Set objCBBInitialiser = objToolBar.Controls.Add(Type:=msoControlButton)
objCBBInitialiser.Tag = "Initialiser"
objCBBInitialiser.Caption = "R?-initialiser"
objCBBInitialiser.OnAction = "<!" & gstrProgID & ">"
'btnAssocier.OnAction = strProjet & "InitialiserContact"
objCBBInitialiser.ToolTipText = "Initialiser les 2 listes"
' Initialiser les listes de choix
objCBCBClient.Text = ""
cbClient.Text = ""
objToolBar.Position = msoBarTop
objToolBar.Visible = True
'----------------------------
exit_colInsp_NewInspector:
Set cbClient = Nothing
Set objToolBar = Nothing
Exit Sub
ERRH_colInsp_NewInspector:
Call HandleError(Err.Number, Err.Description, 1, strSub, sngStep, False)
Resume exit_colInsp_NewInspector
End Sub
> Be more specific. Where are those listboxes? Are they on Outlook forms or a
> VB form or what? Did you change any binding on those controls if they are on
[quoted text clipped - 19 lines]
> >
> > Steph
Ken Slovak - [MVP - Outlook] - 05 Apr 2004 18:17 GMT
Err.Number is not a string. It's a numeric value. You should first of all
try to find an existing button, control or toolbar by assigning it to an
appropriate object and then delete it if it exists. Second, always use
.OnAction if you want to handle any events for whatever you added. Third,
always use a unique .Tag property for each object you add or you will
receive multiple event firings each time the object is clicked.
Combo's in Outlook CommandBars are problematical. Some people have gotten
them to work but most people have found they don't work correctly in Outlook
even if they do in other Office applications.

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
> I make a mistake...I write that I use listboxes....but I use comboboxes.
>
[quoted text clipped - 83 lines]
> Resume exit_colInsp_NewInspector
> End Sub