Is it possible to write a batch file to open an Excel 2003 sheet with a macro

pedro-egoli

Well-known Member
Joined
Apr 25, 2004
Messages
1,217
Office Version
  1. 2016
Platform
  1. Windows
Am having difficulty writing a batch file around the following
TYPE
Microsoft Office Excel 2007 Macro-Enabled Workbook
LOCATION
C:\Users\Peter\Documents\AllData\PVOutput files\Pvoutput solar alinta estimates
FILE NAME
7XX ROI sheet FOR BILL starting 090318.xlsm”

This is what I wrote
Code:
Start /D "C:\Program files\Microsoft office\office\excel.exe\Users\Peter\Documents\AllData\PVOutput files\Pvoutput solar alinta estimates\7XX ROI sheet FOR BILL starting  090318.xlsm”
It worked the first time I clicked on the bat file located at "C:\Users\Peter\Desktop" under the name Alinta test 2.bat

However, the next time I tried it no luck just a momentaropening and closing of batch file.

Any assistance appreciated

Pedro
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
A batch file, as in "runs in a DOS window" type of batch file?

This works for me:-

call "C:\Program Files (x86)\Microsoft Office\Office12\excel.exe" "c:\temp\testfile.xlsm"
 
Upvote 0
A batch file, as in "runs in a DOS window" type of batch file?

This works for me:-

call "C:\Program Files (x86)\Microsoft Office\Office12\excel.exe" "c:\temp\testfile.xlsm"

Thanks Ruddles.
Got it to work using this
start /D "C:\Program Files (x86)\Excel Launcher" /B "Excel Launcher.exe" "C:\Users\Peter\Desktop\Alinta estimated bill.xlsm"

Your assistance appreciated

Pedro
 
Upvote 0

Forum statistics

Threads
1,215,837
Messages
6,127,185
Members
449,368
Latest member
JayHo

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