LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using value from pulldown box in macro

If you mean a data validation drop down list?

Then you can use this
Sheets(Range("D3").Value).Select


--
Regards Ron de Bruin
http://www.rondebruin.nl


"k" wrote in message ...
Does anyone know if there is a way to use the value selected in a pulldown
box in a macro? I've already set up the pulldown box. Once that value has
been selected, I want to use it in the following simple macro. If this is
possible, how do I reference the selected value of the pulldown box?

If anyone is aware of a good web resource that'd be useful, that'd be
appreciated. I was unable to find a resource with regards to this when I
searched.

Thanks in advance for any assistance.

k

--

Sub CompileMfgBatteryList()

Dim i As Integer, j As Integer
Dim tempmodel As String
i = 4
j = 2

Sheets("DataSheet").Activate
Range("B2:B150").Delete

' I'd like to pull the name of the sheet from the pulldown box.
' Something like Sheets(valuefrompulldownbox).Activate

Sheets("GNB").Activate

Do Until IsEmpty(Cells(i, 2))
tempmodel = Cells(i, 2).Value

i = i + 6
Sheets("DataSheet").Activate
Cells(j, 2) = tempmodel
j = j + 1
Sheets("GNB").Activate
Loop

End Sub

k




 
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
Pulldown that searches? gilligan5000 Excel Discussion (Misc queries) 1 June 7th 07 02:53 PM
Help with hyperlinks in pulldown list. Anyone know how? Wayne Knazek Excel Worksheet Functions 0 June 26th 06 04:26 PM
pulldown boxes Gord Dibben[_3_] Excel Programming 0 July 25th 03 12:08 AM
pulldown boxes Debra Dalgleish[_2_] Excel Programming 0 July 25th 03 12:01 AM
pulldown boxes Dan E[_2_] Excel Programming 0 July 24th 03 11:54 PM


All times are GMT +1. The time now is 05:36 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"