Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro that changes Drop Down Box

Thanks - worked perfectly!

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Drop Down Menu MCook Excel Discussion (Misc queries) 1 October 11th 07 09:12 PM
Print Macro For Drop Down tojo107 Excel Discussion (Misc queries) 2 June 13th 07 03:03 PM
Macro with Drop Down Box Maggie Excel Discussion (Misc queries) 1 February 20th 07 10:00 PM
Macro to add drop-down lists comparini3000 Excel Discussion (Misc queries) 1 June 8th 06 01:20 AM
Drop Down Box & Macro A.S. Excel Discussion (Misc queries) 3 January 24th 06 04:21 PM


All times are GMT +1. The time now is 09:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"