View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Application run help!

Assuming the macros to be run are in a general module of the activeworkbook.

Sub Macro1 ()
Dim MyName As String
MyName = InputBox("Enter Scan + Qty Scanned", "Enter Quantity you Scanned",
"Scan1")
Application.run = "'" & ActiveWorkbook.Name & "'!" & MyName
End Sub


--
Regards,
Tom Ogilvy



"Windsong1948" wrote in message
...
I have 10 macros in a workbook. I want to write one macro that will allow
the user to input any one of the 10 macros they want to run. When I have
needed a macro for my work I have gotten by over the years with the basics
but this has me stumped. What I have written is shown below: What have I
done wrong?

Sub Macro1 ()
Dim MyName As String
MyName = InputBox("Enter Scan + Qty Scanned", "Enter Quantity you

Scanned",
"Scan1")
ActiveWorkbook.Application.run = MyName
End Sub