Can A Macro Start A Closed Excel Workbook?

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,196
Office Version
  1. 2010
Platform
  1. Windows
Scheduler will not work on our network. Can a macro open a closed workbook? Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Could this be set on a timer and run every 6 hours
 
Upvote 0
This works but not on the timer Any suggestions please. Thanks

Code:
Sub openBk()
    Application.OnTime TimeValue("00:01:00"), "openBK"
    Workbooks.Open "O:\QACOM\Production Reports\End Line Maintenance Dashboard Master.xlsm"

End Sub
 
Upvote 0
Not that I've done anything like this, but if I were going to, then I'd have that set up on a script somewhere outside of Excel, something that's running all the time.

Then the script only has to open the file, which can have a Workbook_Open macro that fires when the file is opened, performs whatever steps you want, and then self-saves and closes, waiting for the next Open event to be fired by the non-Excel script.
 
Upvote 0
Anyone know why this times will not work??

Code:
Sub openBk()
    Application.OnTime TimeValue("00:01:00"), "openBK"
    Workbooks.Open "O:\QACOM\Production Reports\End Line Maintenance Dashboard Master.xlsm"

End Sub
 
Upvote 0
OK that's all very confusing, Ill keep looking thanks
 
Upvote 0
Just look at the first item, 1 Unique ontime action.
I believe that is how you want to structure your code, something like this:
Code:
Sub RunOnTime()
    Application.OnTime TimeValue("00:01:00"), "openBK"
End Sub


Sub openBk()
    Workbooks.Open "O:\QACOM\Production Reports\End Line Maintenance Dashboard Master.xlsm"
End Sub
 
Upvote 0
Thank you very much for the code, like the other one this runs when triggered manually but not with the timer. There must be something I need to do yet. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top