Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I have a list of ten sub names in a drop down F1, can I make my MySubCaller run the sub I choose in F1?
This little diddy doesn't work and the scant info I can find to do this leads me to think it is a bogus way to manage the running of ten subs from a single on sheet button. Thanks, Howard Option Explicit Sub MySubCaller() Dim i As String i = Range("F1").Value Application.Run i End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sunday, September 29, 2013 10:48:37 PM UTC-7, Howard wrote:
If I have a list of ten sub names in a drop down F1, can I make my MySubCaller run the sub I choose in F1? This little diddy doesn't work and the scant info I can find to do this leads me to think it is a bogus way to manage the running of ten subs from a single on sheet button. Thanks, Howard Option Explicit Sub MySubCaller() Dim i As String i = Range("F1").Value Application.Run i End Sub I found this but I still get an error 400 with: Application.Run (i) expression .Run(Macro,[Arg1, , , Arg30]) expression A variable that represents an Application object Howard |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Sun, 29 Sep 2013 23:14:45 -0700 (PDT) schrieb Howard: Application.Run (i) try worksheet_change event: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$F$1" Then Exit Sub Application.Run (Target) End Sub Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Monday, September 30, 2013 12:12:49 AM UTC-7, Claus Busch wrote:
Hi Howard, Am Sun, 29 Sep 2013 23:14:45 -0700 (PDT) schrieb Howard: Application.Run (i) try worksheet_change event: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$F$1" Then Exit Sub Application.Run (Target) End Sub Regards Claus B. With this in the sheet 1 module I get an error on the App.Run(Target) line saying macros may not be available or may be disabled. (There are three more macros like the one shown) Howard Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$F$1" Then Exit Sub Application.Run (Target) End Sub Sub xx1() MsgBox "one" End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Mon, 30 Sep 2013 01:11:37 -0700 (PDT) schrieb Howard: With this in the sheet 1 module I get an error on the App.Run(Target) line saying macros may not be available or may be disabled. (There are three more macros like the one shown) please have a look: https://skydrive.live.com/#cid=9378A...121822A3%21326 for the workbook "Macro". Download it with rightclick Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Mon, 30 Sep 2013 01:11:37 -0700 (PDT) schrieb Howard: Sub xx1() xx1 is a cell reference. You can't name a macro like a cell reference Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Mon, 30 Sep 2013 10:35:40 +0200 schrieb Claus Busch: xx1 is a cell reference. You can't name a macro like a cell reference a macro named like a cell reference you can run from VBA editor. If you try to run it from a sheet you can't, because the Run button is disabled. Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I call VBA subs from different spreadsheet from code behind form? | Excel Discussion (Misc queries) | |||
how to I make member list that indicates when subs due | Excel Worksheet Functions | |||
multiple select from the drop down list in excel. list in one sheet and drop down in | Excel Discussion (Misc queries) | |||
Call subs from another wkbk? | Excel Programming | |||
Call VBA-Subs From Old XLM-Macros | Excel Programming |