Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

reference comobobox thru vba in Excel

Posted on 2011-03-04
4
Medium Priority
?
328 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:ClaudeWalker
  • 2
4 Comments
 
LVL 9

Expert Comment

by:hitsdoshi1
ID: 35040964
curVAL= ActiveSheet.Shapes("cboFight1").Value
0
 

Author Comment

by:ClaudeWalker
ID: 35040996
ActiveSheet.Shapes("cboFight1").Value

still gives me that error
0
 
LVL 9

Accepted Solution

by:
chwong67 earned 2000 total points
ID: 35041002
curVal = ActiveSheet.DropDowns(Application.Caller).List(ActiveSheet.DropDowns(Application.Caller).Value)
0
 

Author Comment

by:ClaudeWalker
ID: 35041020
curVal = ActiveSheet.DropDowns(Application.Caller).List(ActiveSheet.DropDowns(Application.Caller).Value)

WORKED!!!!

That seems way overly complicated though.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question