View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
k k is offline
external usenet poster
 
Posts: 8
Default Using value from pulldown box in macro

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