PDA

View Full Version : Running procedures stored in variables



jlingle
02-21-2012, 05:11 AM
Using PowerPoint 2010 I am trying the run a procedure stored in a variable. The procedure is stored in a Module. It looks like others have done this with the "Run" command--at least in Excel. However, when I try to execute the command: "Run tNames(i)" from a control procedure called "InitiateTemplate" I get an error message that says:

"Cannot run the macro 'Cover'. The macro may not be available in this workbook or all macros may be disables"

The procedure is contained in a different Module, but I've doubled checked and it is indeed named "Sub Cover()". Is there a way to call this procedure using a variable name from a procedure in a different module?

John Wilson
02-21-2012, 05:42 AM
Try Application.Run tNames(i)

jlingle
02-21-2012, 06:30 AM
Like your other solutions, worked like a charm. Thanks.