Solved

reference comobobox thru vba in Excel

Posted on 2011-03-04
4
320 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now