Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I wish to create a simple drop down menu using VBA. I do not wish to pu an array of the item names to one side of the spreasheet and link t that, but put the item names in by using VBA . I am not working from UserForm, but using Toolbox and the VB Editor. I have created a combobox as a start :) So far I have tried the following without success: Private Sub Forms.ComboBox1_Change() With ComboBox1 .ListFillRange = "" '.AddItem "X" '.AddItem "Y" '.AddItem "Z" '.AddItem "X2" '.AddItem "Y2" '.AddItem "Z2" End With End Sub All assistance and suggestions gratefully accepte -- JoeS0 ----------------------------------------------------------------------- JoeS01's Profile: http://www.excelforum.com/member.php...nfo&userid=981 View this thread: http://www.excelforum.com/showthread.php?threadid=38271 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The ' before the AddItem lines are not there in my code - it was leftover form my testin -- JoeS0 ----------------------------------------------------------------------- JoeS01's Profile: http://www.excelforum.com/member.php...nfo&userid=981 View this thread: http://www.excelforum.com/showthread.php?threadid=38271 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The ' before the AddItem lines are not there in my code - it was leftover from my testing :eek -- JoeS0 ----------------------------------------------------------------------- JoeS01's Profile: http://www.excelforum.com/member.php...nfo&userid=981 View this thread: http://www.excelforum.com/showthread.php?threadid=38271 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code would look something like this
Sub ComboBox1_Load() With ComboBox1 .AddItem "X" .AddItem "Y" .AddItem "Z" .AddItem "X2" .AddItem "Y2" .AddItem "Z2" .ListIndex = 0 End With End Sub You would have a separate routine to load it at start, unlikely to use an event procedure to load it. -- HTH Bob Phillips "JoeS01" wrote in message ... I wish to create a simple drop down menu using VBA. I do not wish to put an array of the item names to one side of the spreasheet and link to that, but put the item names in by using VBA . I am not working from a UserForm, but using Toolbox and the VB Editor. I have created a combobox as a start :) So far I have tried the following without success: Private Sub Forms.ComboBox1_Change() With ComboBox1 ListFillRange = "" '.AddItem "X" '.AddItem "Y" '.AddItem "Z" '.AddItem "X2" '.AddItem "Y2" '.AddItem "Z2" End With End Sub All assistance and suggestions gratefully accepted -- JoeS01 ------------------------------------------------------------------------ JoeS01's Profile: http://www.excelforum.com/member.php...fo&userid=9816 View this thread: http://www.excelforum.com/showthread...hreadid=382714 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Control ToolBox ComboBox | Excel Discussion (Misc queries) | |||
Format the items in a combobox | Excel Programming | |||
how to add items to combobox | Excel Programming | |||
ComboBox Items | Excel Programming | |||
ComboBox items | Excel Programming |