Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default "implant" ActiveX ComboBox value into if eq'n

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default "implant" ActiveX ComboBox value into if eq'n

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default "implant" ActiveX ComboBox value into if eq'n

Make sure "Combobox_Change" is in "Sheet1", "Sheet2", etc. not in
"ThisWorkbook" where you add the names:

Sheets("Sheet1").Combobox1.additems "Name1", etc

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default "implant" ActiveX ComboBox value into if eq'n

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
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
VBA fails with Run-time Error 429 "ActiveX component can't create object" [email protected] Excel Programming 1 June 4th 09 11:43 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
what does =EMBED("Forms.ComboBox.1","") mean? dan dungan Excel Programming 2 April 10th 08 10:47 PM
"enter" event of activex combobox? crapit Excel Programming 11 July 13th 04 11:59 AM
Can ActiveX controls be "disabled" and "enabled"? William DeLeo Excel Programming 1 May 7th 04 09:10 PM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"