Help a newb with a batch file

Permabanned
Joined
8 Mar 2007
Posts
219
How goes it?

I'm using a batch file to open Excel then run a macro. This bit is easy but the macro displays a pop up window within Excel

What do i need to do to the batch file to close the pop up, then excel after a minute or two?
 
This is a real kludge but it might work. Basically you ping a non-existant IP address (1.1.1.1) but delay it for x milliseconds (10000 = 10 seconds). Then you kill the task to close the window.

This will close the whole of excel down after the delay. If you want to close only the popup then excel later on, I don't think that can be done with the batch file, you'd need some macro software.

@Echo OFF
Start excel_document.xls
PING 1.1.1.1 -n 1 -w 10000 >NUL
TASKKILL /IM EXCEL.EXE /F
 
Last edited:
Back
Top Bottom