ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Issue with Excel Macro (https://www.excelbanter.com/excel-programming/384334-issue-excel-macro.html)

Ani

Issue with Excel Macro
 
Hi,
I'm trying to use the graphical interface for Scheduler called
WinAT to open up an excel sheet which has a macro. But when this task
runs at the scheduled time, it gives the error - 'Cannot find file
<excel file name......'

If I open up this excel file manually, the macro works fine.
Also, if I manually create a scheduled task at C:\Windows\Tasks and
then try to run the task, the macro works fine. (This task will be
created with username as my account.)

Could anyone please help in this?

Thanks,
Anishya


joel

Issue with Excel Macro
 
to simulate a command line entry and to debug you problem. You can go to the
Start menu and chose run. In the run box I typed the following

excel c:\temp\book1.xls

This opened an excel workbook. Youcan also just type excel and a new
workbook will open.

Excel accepts a a parameter the file to open.

the command line definintion for excel can be seen by opening a window
Explorer window.

from the Tools Menu - Folder Options and the Select File Types tab.
find XLS in the File types
Select XLS and press advance.
select Open and then edit.

the DDE line on my computer shows [open("%1")]
this indicates to open the 1st parameter ([] optional) on the command line.




"Ani" wrote:

Hi,
I'm trying to use the graphical interface for Scheduler called
WinAT to open up an excel sheet which has a macro. But when this task
runs at the scheduled time, it gives the error - 'Cannot find file
<excel file name......'

If I open up this excel file manually, the macro works fine.
Also, if I manually create a scheduled task at C:\Windows\Tasks and
then try to run the task, the macro works fine. (This task will be
created with username as my account.)

Could anyone please help in this?

Thanks,
Anishya




All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com