Hi All
I have a workbook containing some SLA measures & a user form.
Depending on what options the users picks I'd like to build/concatenate the a macro name to be called
I've managed to build the macro name & store it in a variable
But I can't figure out how to call it?
For instance the macro name is M10, and I have confirmed it is stored in variable 'MacroName' by using a MsgBox to display the contents
When I use 'Call M10' it executes no problem. But when I call MacroName.Value I get an error - 'Compile error: Invalid qualifier?
Any help appreciated
Regards
Vicky
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("C10")) Is Nothing Then
Dim SLA As String
Dim MeasureName As String
Dim MeasureNumber As String
Dim MacroName As String
SLA = Range("B10").Value
MeasureName = Range("C10").Value
MeasureNumber = Split(MeasureName, " ")(0)
MacroName = "M" & MeasureNumber
Sheets(SLA).Select
MsgBox MacroName
Call MacroName.Value
End If
End Sub
Bookmarks