Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi. you must have the . before each method/property if you use WITH Sub combodrop() With ActiveSheet.ComboBox1 .Visible = True .Clear .AddItem "Test 1" .AddItem "Test 2" .AddItem "Test 3" .DropDown .Visible = False End With End Sub "Leith Ross" wrote in message ... sunilpatel;389250 Wrote: Sorry, as I have asked this question before, but can no one help me? Having tried everything i can think of, i'm realy frustrated now. In my code i use .dropdown (dot dropdown) , but then i wish the dropdown list to 'close' once an item in the list has been selected. This behaves as expected if combobox is activated by a mouse click, but if ..dropdown is used the dropdown list does not close. I realy need a work around or something as my code relies heavily on this process. Please help - using excel 2000 Sub combodrop() ActiveSheet.ComboBox1.Visible = True ActiveSheet.ComboBox1.AddItem "TEST" ActiveSheet.ComboBox1.DropDown ActiveSheet.ComboBox1.Visible = False End Sub Sunil Hello Sunil, I used the code below in both Excel 2000 and 2003 with no problems. It is basically the same as yours. Try it out. If it doesn't work then there is problem somewhere else. Sub combodrop() With ActiveSheet.ComboBox1 Visible = True Clear AddItem "Test 1" AddItem "Test 2" AddItem "Test 3" DropDown Visible = False End With End Sub Sincerely, Leith Ross -- Leith Ross Sincerely, Leith Ross 'The Code Cage' (http://www.thecodecage.com/) ------------------------------------------------------------------------ Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=108818 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select From dropdown and return another dropdown menu | Excel Discussion (Misc queries) | |||
Dropdown box display only data dependent on another dropdown box? | Excel Worksheet Functions | |||
Dropdown List within a dropdown | Excel Worksheet Functions | |||
populating a dropdown based on choice from a previous dropdown | Excel Programming | |||
offer dropdown options based on another dropdown | Excel Discussion (Misc queries) |