Listbox on Toolbar

  • Thread starter Thread starter Rolf Gossen
  • Start date Start date
R

Rolf Gossen

Hi NG,

I'am working with Access 2003 and I would like to put a Listbox on a
customized Toolbar. The Fomatting-Toolbox for example has three
Listboxes on it. So why shouldn't it be possible to display a Listbox
on a customized Access-Toolbar. But I have no idea how to do it. Can
anyone help ?

Thanks
Rolf
 
Rolf Gossen said:
Hi NG,

I'am working with Access 2003 and I would like to put a Listbox on a
customized Toolbar. The Fomatting-Toolbox for example has three
Listboxes on it. So why shouldn't it be possible to display a Listbox
on a customized Access-Toolbar. But I have no idea how to do it. Can
anyone help ?


Public Sub CreateMenuList()

Dim V As Object
Dim MenuList As Object

Set V = CommandBars("MenuBarName")
Set MenuList = V.Controls(1)
MenuList.DropDownLines = 5
MenuList.Width = 150
MenuList.DropDownWidth = 150
MenuList.AddItem "FirstItemInList"
MenuList.AddItem "SecondItemInList"
MenuList.AddItem "ThirdItemInList"
MenuList.AddItem "FourthItemInList"
MenuList.AddItem "FifthItemInList"
Set MenuList = Nothing
Set V = Nothing

End Sub
 
Previous post was missing a line

Public Sub CreateMenuList()

Dim V As Object
Dim MenuList As Object

Set V = CommandBars("MenuBarName")
V.Controls.Add 4, 1
Set MenuList = V.Controls(1)
MenuList.DropDownLines = 5
MenuList.Width = 150
MenuList.DropDownWidth = 150
MenuList.AddItem "FirstItemInList"
MenuList.AddItem "SecondItemInList"
MenuList.AddItem "ThirdItemInList"
MenuList.AddItem "FourthItemInList"
MenuList.AddItem "FifthItemInList"
Set MenuList = Nothing
Set V = Nothing

End Sub
 
Back
Top