Solved

Get Form combobox macro name with code

Posted on 2011-02-24
3
385 Views
Last Modified: 2012-06-21
Was wondering if there is a similar way (as below) or a different way to grab the "Macro name:" value of the macro assigned to an old Form combobox.  Thank you very much.

Had similar question with ID 26805164  where I was looking to grab the "Input range:" and "Cell link:" values of an old Form combobox.  That question was answered with the following code:

Sub GetProps()
    Dim S As Shape
    For Each S In ActiveSheet.Shapes
        If S.Type = msoFormControl Then
            If S.FormControlType = xlDropDown Then
                S.Select
                MsgBox Selection.Name & vbCrLf & Selection.ListFillRange & vbCrLf & Selection.LinkedCell
            End If
        End If
    Next
End Sub

0
Comment
Question by:SEMCIT
  • 2
3 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 34973945
Have you tried S.Name?

Kevin
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 34974009
Sorry, misread the question. Try:

   S.OnAction

Kevin
0
 

Author Closing Comment

by:SEMCIT
ID: 34974126
Thank you very much for the quick response and perfect, simple solution.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

803 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