Solved

reference comobobox thru vba in Excel

Posted on 2011-03-04
4
319 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
Comment Utility
curVAL= ActiveSheet.Shapes("cboFight1").Value
0
 

Author Comment

by:ClaudeWalker
Comment Utility
ActiveSheet.Shapes("cboFight1").Value

still gives me that error
0
 
LVL 9

Accepted Solution

by:
chwong67 earned 500 total points
Comment Utility
curVal = ActiveSheet.DropDowns(Application.Caller).List(ActiveSheet.DropDowns(Application.Caller).Value)
0
 

Author Comment

by:ClaudeWalker
Comment Utility
curVal = ActiveSheet.DropDowns(Application.Caller).List(ActiveSheet.DropDowns(Application.Caller).Value)

WORKED!!!!

That seems way overly complicated though.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

772 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

11 Experts available now in Live!

Get 1:1 Help Now