Thread: Combo Boxes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ronin Ronin is offline
external usenet poster
 
Posts: 17
Default Combo Boxes

Trystan,

Try this

Function ReturnCBOName(optional byval cboBox as MSForms.ComboBox) As String
ReturnCBOName = cboBox.Name
End Function

when you call the function in any procedure use the following
Assigning to a string variable:
strVariable = ReturnCBOName(your_combo_box_Name)
Other Reason (sample "IF" statement)
If ReturnCBOName(your_combo_box_Name) = "Your Result If TRUE" then
End If

Best Luck.


Ronin


"Trystan" wrote:

I have a series of combo boxes, and have created a macro to make other
boxes appear or disappear. To make the correct boxes appear, I need the
macro to select the name of the combo box that was used. ie if it was
"dd1" i need a function that will return this to a string.

Any ideas?

T