Select a value from a drop down list using Macro?

safeword

New Member
Joined
May 11, 2010
Messages
2
Hi all! I am fairly new to Excel Macro and I am trying to figure out how to select a value from a drop down list using Macro.

Say, I have a drop down client list in cell A1. The list has 100 values, say Client1 Client2 Client 3...Client100. A pre-set exhibit is linked to the value in cell A1, so that every time you select a client from the drop down list, the values in the exhibit changes accordingly.

What I would like to do, is to have macro select the client value from the drop down list, one client at a time, for 100 times, and then copy and paste the exhibit in a new excel workbook and save. I can figure out the copy and paste part using macro recorder. BUT, not the selecting value from a drop down list. I tried using macro recorder, but it didn't seem to record my action?:confused:

Anyone has any suggestions? Thank so much in advance!!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi and Welcome to the Board!!
It would probably be easier to work off of your Source List
Code:
Dim cl as Range
For Each cl In Range("$B$1"$B$100")
'your copy code
Next cl
Change to the range where you sorce list is stored.

lenze
 
Upvote 0
Thank you, Lenze! It works beautifully!!(y)

If I may bug you one more time, why doesn't macro reorder record the select-a-value-from-a-drop-down-list action?
 
Upvote 0
Hi. I am also new to macros. I have the same problem, but because of the add in source of my data (xLerate plus) I have to select from a drop down box. I have 11 drop down boxes that when I was recording the macro I selected a value, but when running the macro that are not selecting. :confused:

If anyone could help me out it would be appreciated. :)



Sub AbsLLCMNYslide2()
'
' AbsLLCMNYslide2 Macro
'
'
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=21
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=21
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=30
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=36
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("A169").Select
ActiveCell.FormulaR1C1 = "FDMx"
Range("A170").Select
ActiveWindow.ScrollRow = 117
ActiveWindow.ScrollRow = 116
ActiveWindow.ScrollRow = 113
ActiveWindow.ScrollRow = 102
ActiveWindow.ScrollRow = 84
ActiveWindow.ScrollRow = 78
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top