ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Recording a macro to change item selected in drop down list (https://www.excelbanter.com/excel-worksheet-functions/203616-recording-macro-change-item-selected-drop-down-list.html)

Jen

Recording a macro to change item selected in drop down list
 
I am trying to record a macro in Excel that will reset values that are
standard for specific customer programs we have. The worksheet has different
data validation drop down lists and the correct selection is different for
different programs. Selecting the correct value while recording the macro
doesn't seem to work. Is there a special trick to make this happen? Is this
even possible? Thanks!

ryguy7272

Recording a macro to change item selected in drop down list
 
Can you use a ComboBox instead? It would be something like this:
ActiveSheet.Shapes("Drop Down 1").Select

If you really want to go with Data Validation, and you could have a very
legitimate reason for this, take a look at this site:
http://www.contextures.com/xlDataVal10.html

If that doesn't work for you, take a look at this:
http://www.contextures.com/tiptech.html

There are tons of Data Validation options for you; all arranged in
alpha-order.

Regards,
Ryan---

--
RyGuy


"Jen" wrote:

I am trying to record a macro in Excel that will reset values that are
standard for specific customer programs we have. The worksheet has different
data validation drop down lists and the correct selection is different for
different programs. Selecting the correct value while recording the macro
doesn't seem to work. Is there a special trick to make this happen? Is this
even possible? Thanks!


Jen

Recording a macro to change item selected in drop down list
 
I still can't figure out how to make this work. I tried again using a combo
box instead. I really don't know anything about writing code, so the line of
code you've written is Greek to me. If you could tell me exactly where I
would need to insert the code you've written, and what the commands are
doing, that would be great.

To be even more clear, I have different macros assigned to various buttons.
Depending on the button I select, a number of values are reset in various
cells, but I also want it to change the selection in the combo box, or data
validation drop down (whichever would work better in this situation). The
macro is assigned correctly, because when I push one of the buttons, all of
the values change EXCEPT for the selection in the drop down list. I've
re-recorded the macro several times to make sure I didn't accidentally miss
recording that one action.

The links you provided were very interesting and helpful for other things,
but didn't help me figure out this issue.

Thanks!

Jen

"ryguy7272" wrote:

Can you use a ComboBox instead? It would be something like this:
ActiveSheet.Shapes("Drop Down 1").Select

If you really want to go with Data Validation, and you could have a very
legitimate reason for this, take a look at this site:
http://www.contextures.com/xlDataVal10.html

If that doesn't work for you, take a look at this:
http://www.contextures.com/tiptech.html

There are tons of Data Validation options for you; all arranged in
alpha-order.

Regards,
Ryan---

--
RyGuy


"Jen" wrote:

I am trying to record a macro in Excel that will reset values that are
standard for specific customer programs we have. The worksheet has different
data validation drop down lists and the correct selection is different for
different programs. Selecting the correct value while recording the macro
doesn't seem to work. Is there a special trick to make this happen? Is this
even possible? Thanks!



All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com