![]() |
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 |
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/ |
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 |
Macro that changes Drop Down Box
|
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 |
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 |
All times are GMT +1. The time now is 08:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com