Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
I am writing a macro that will execute each time the file is opened.
am doing this so that all the values reset to default values. However I have nurmerous drop down boxes on the inputs page and cannot figur out how or if its possible to have a macro select a value in a dro down box. Any thoughts or idea would be apprecaited. Thanks, Bria -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
Brian,
What sort of dropdowns? If Data Validation, just set the value of the host cell. If Forms combobox, Activesheet.DropDowns("Drop Down 1").ListIndex=3 If Control Toolbox, Activesheet.OLEObjects("Combobox1").object.Listind ex=4 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "peekbo " wrote in message ... I am writing a macro that will execute each time the file is opened. I am doing this so that all the values reset to default values. However, I have nurmerous drop down boxes on the inputs page and cannot figure out how or if its possible to have a macro select a value in a drop down box. Any thoughts or idea would be apprecaited. Thanks, Brian --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
See another reply at your other post.
"peekbo <" wrote: I am writing a macro that will execute each time the file is opened. I am doing this so that all the values reset to default values. However, I have nurmerous drop down boxes on the inputs page and cannot figure out how or if its possible to have a macro select a value in a drop down box. Any thoughts or idea would be apprecaited. Thanks, Brian --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
I got the dropdown forms to default to the value I needed, however, o
any drop down that had a huge number in its name it would not execute. For example: Sheets("Inputs").DropDowns("Drop Down 12").ListIndex = 1 Worked fine, however: Sheets("Inputs").DropDowns("Drop Down 23483").ListIndex = 1 Did not work. Any idea. The way I figure out what each drop down name was, wa selected it and choosing assign macro to see what name it wa assigning. Something else I noticed. On the drop downs with larg numbers, it listed the whole file name before the drop down: 'Mission Profile Calculator - TEST - HIDE.xls'!DropDown2842_Change However on the ones with small numbers, it only listed the dropdow name: DropDown12_Change Any thoughts? Bria -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that changes Drop Down Box
Try rightclicking on the dropdown and then look at the name box (to the left of
the formula bar). "peekbo <" wrote: I got the dropdown forms to default to the value I needed, however, on any drop down that had a huge number in its name it would not execute. For example: Sheets("Inputs").DropDowns("Drop Down 12").ListIndex = 1 Worked fine, however: Sheets("Inputs").DropDowns("Drop Down 23483").ListIndex = 1 Did not work. Any idea. The way I figure out what each drop down name was, was selected it and choosing assign macro to see what name it was assigning. Something else I noticed. On the drop downs with large numbers, it listed the whole file name before the drop down: 'Mission Profile Calculator - TEST - HIDE.xls'!DropDown2842_Change However on the ones with small numbers, it only listed the dropdown name: DropDown12_Change Any thoughts? Brian --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Drop Down Menu | Excel Discussion (Misc queries) | |||
Print Macro For Drop Down | Excel Discussion (Misc queries) | |||
Macro with Drop Down Box | Excel Discussion (Misc queries) | |||
Macro to add drop-down lists | Excel Discussion (Misc queries) | |||
Drop Down Box & Macro | Excel Discussion (Misc queries) |