• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

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

0
SEMCIT
Asked:
SEMCIT
  • 2
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
Have you tried S.Name?

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Sorry, misread the question. Try:

   S.OnAction

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now