Macro to activate a Batch file !

  • Thread starter Thread starter Tarek
  • Start date Start date
T

Tarek

i've just installed a cash drawer for my grocery store and the thing
opens with the PC using a serial cnxn and the execution of a batch
file , can anyone help me in have the batch file executed from Excel
using a macro !!! ASAP please thnx
 
Dear Tom,
Thnx a lot, the code worked just fine , but as soon as i saved the excel
sheet and exited and reopened, it stopped working and then i noticed
that the batch file switched location to "c:\ my documents\read.bat"
instead of c:\windows\desktop\read.bat" why is this happening. I've also
tried hyperlinking to the batch file, but the same thing happened (I've
seen the properties of the batch file and the "Commandline" and
"Working" slots are empty, could that be the cause ??
 
I can't say, but I would save the file in a specific directory (hopefully
the bat file doesn't contain code that moves it to another location). Then
the directory should not change I wouldn't think. You can look at the bat
file in notepad and see what code it contains.
 
Back
Top