Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your response guys. The application.Run philosophy works
but then says it cant find the macro, it exists as a sub under the code on a form that exists. Is there any way I can tell it to look there. Or do I have to create the macro RunReport222 and then call that. Thanks in advance John "Tom Ogilvy" wrote in message ... Dim szReport As String szReport = CLng(szSelectedReport) szReport = "RunReport" & szReport Application.Run szReport -- Regards, Tom Ogilvy "John Dempsey" wrote in message om... I have a If ....Else ....Then with code: ElseIf szSelectedReport = "204" Then RunReport204 ElseIf szSelectedReport = "205" Then RunReport205 ElseIf szSelectedReport = "220" Then RunReport220 This goes on for sometime and what I want to produce is a shortened version i.e. Dim szReport As String szReport = CDbl(szSelectedReport) szReport = "RunReport" & szReport szReport So the Sub is called RunReport222 and I have created that but I dont know how to tell VB to now run that Sub. Can anyone help me please. Regards John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
QUERY & HELP: so slow executing VBA code... :S | Excel Worksheet Functions | |||
code sample for executing a VB function in Excel using perl | Excel Worksheet Functions | |||
Problems executing Excel VBA code in Microsoft Office 2003 | Excel Programming | |||
executing macros with variable names | Excel Programming | |||
executing code when a module opens | Excel Programming |