Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry changing batch file, Excel

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
0
0
US
This one is tough (for me).
I have a batch file that makes registry setting changes. It changes the type of files that Excel changes to when you save a file (95 vs. 2000). For some reason, we cannot make that change manually from within Excel (Tools > Options > Transition). I think our admins have not allowed that change to made manually. Anyway...
If I start Excel, run the batch file from NT Explorer, close Excel, restart Excel and check the setting, it has indeed been changed, as expected.
However, if I create an Excel file that calls the batch file via the shell command, it appears to run just fine, but when I restart Excel, there is no evidence of the fact that the batch file was run.
Does this make sense? Basically, 1) whether Excel is open or not has no effect on the batch file, 2) when the batch file is run from NT Explorer by double-clicking on it, it works as it should and 3) when the batch file is run from the Run dialog box on the NT Start Menu or when it is called from VBA code using the shell command it does not work 4) when the batch file is run from the command prompt it works fine...
Any suggestions??
Thanking you in advance, Mike K
 
I think that Excel won't allow or will rewrite the registry changes everytime it exits. THis is probably it. Instead why don't you make a new way of opening Excel. Change your batch file to automatically open Excel once it's done. THne change all your links for Excel to the batch file. Craig, mailto:sander@cogeco.ca

Remember not to name the Lambs...
It only makes the chops harder to swallow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top