Get Form combobox macro name with code

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

SEMCITAsked:
Who is Participating?
 
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
Sorry, misread the question. Try:

   S.OnAction

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Have you tried S.Name?

Kevin
0
 
SEMCITAuthor Commented:
Thank you very much for the quick response and perfect, simple solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.