Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Morning all.
Ok, I've got my combox active to where I can read the names in the list. I'd now like to have an if equation that will pull the value I select in the combobox. Do I have to write a secondary macro/function for that, or can I do it directly on the worksheet? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub ComboBox1_Change()
Select Case ComboBox1.Text Case "Item1" MsgBox ("Item1") Case "Item2" MsgBox ("Item2") Case "Item3" MsgBox ("Item3") Case "Item4" MsgBox ("Item4") Case "Item5" MsgBox ("Item5") End Select End Sub Substitute the name of the text and the code you want to execute for the Msgbox . "Steve" wrote: Morning all. Ok, I've got my combox active to where I can read the names in the list. I'd now like to have an if equation that will pull the value I select in the combobox. Do I have to write a secondary macro/function for that, or can I do it directly on the worksheet? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Make sure "Combobox_Change" is in "Sheet1", "Sheet2", etc. not in
"ThisWorkbook" where you add the names: Sheets("Sheet1").Combobox1.additems "Name1", etc |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi "Phil"
Let me guess, you're a Newton fan (his big Principia Phil. text). Let me understand this... I need to place the code you offered in the workbook that my comboboxes are in-- and not my source list workbook? I.e., my source list is located in my personal.xlsb workbook. We've been making all our macros as globals, by either placing them in the personal.xlsb, or our xlam files. I prefer to keep it that way. "Philosophaie" wrote: Make sure "Combobox_Change" is in "Sheet1", "Sheet2", etc. not in "ThisWorkbook" where you add the names: Sheets("Sheet1").Combobox1.additems "Name1", etc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA fails with Run-time Error 429 "ActiveX component can't create object" | Excel Programming | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
what does =EMBED("Forms.ComboBox.1","") mean? | Excel Programming | |||
"enter" event of activex combobox? | Excel Programming | |||
Can ActiveX controls be "disabled" and "enabled"? | Excel Programming |