Link to home
Start Free TrialLog in
Avatar of ClaudeWalker
ClaudeWalker

asked on

reference comobobox thru vba in Excel

I am trying to access a combobox value through vba.  However my code is not working.

The code is in a module so I figured I'd have to specify a sheet and I'd be okay.

Sub cboFight1_Change()
    Dim curVal As String
    curVal = ActiveSheet.cboFight1.Value
   
    MsgBox curVal
End Sub

I get an object doesn't support that property or method.

Any ideas,
JOe K.
Avatar of hitsdoshi1
hitsdoshi1

curVAL= ActiveSheet.Shapes("cboFight1").Value
Avatar of ClaudeWalker

ASKER

ActiveSheet.Shapes("cboFight1").Value

still gives me that error
ASKER CERTIFIED SOLUTION
Avatar of chwong67
chwong67
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
curVal = ActiveSheet.DropDowns(Application.Caller).List(ActiveSheet.DropDowns(Application.Caller).Value)

WORKED!!!!

That seems way overly complicated though.