Running Macros Remotely (.tcl file)

G

grantmcewan

I am trying to set up an automated macro routine via a .tcl "tickle"
file (scheduled by the windows scheduler) to execute at a set time
each day. When I execute the .tcl file below it will open the excel
file but it errors out when it tries to execute the macro

Error Msg : The macro may not be available in this workbook or all
macros may be disabled.

I can run the macro with no issues manually from the excel file.

1) does anyone have any idea what might be wrong ?

2) is there any other way to automatically run the macros at a given
time ?

Thanks, Grant


TCL script:

set application [::tcom::ref createobject "Excel.Application"]
$application Visible 1

set workbooks [$application Workbooks]
set workbook [$workbooks Open "D:/Profiles/r33998/Desktop/Working
Parts Tracker/Split Out Tracking System/TCL testing.xls" 0 FALSE 2
sourcing]

$application Run "TCL testing.xls!protect_worksheets_"

#$workbook Save
$application Quit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top