ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I call MS DOS commands from Macro. (https://www.excelbanter.com/excel-discussion-misc-queries/96328-how-do-i-call-ms-dos-commands-macro.html)

MrDan8

How do I call MS DOS commands from Macro.
 

Hi,

How can I call MS DOS commands from a Macro.
A copy file command, or any other comamand?

Thanks


--
MrDan8
------------------------------------------------------------------------
MrDan8's Profile: http://www.excelforum.com/member.php...o&userid=35330
View this thread: http://www.excelforum.com/showthread...hreadid=556166


Bearacade

How do I call MS DOS commands from Macro.
 

Shell "cmd"

Be very careful with this ...


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=556166


Chip Pearson

How do I call MS DOS commands from Macro.
 
Create a .bat file and Shell to it.

Sub AAA()
Shell "H:\test.bat"
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"MrDan8"
wrote in message
...

Hi,

How can I call MS DOS commands from a Macro.
A copy file command, or any other comamand?

Thanks


--
MrDan8
------------------------------------------------------------------------
MrDan8's Profile:
http://www.excelforum.com/member.php...o&userid=35330
View this thread:
http://www.excelforum.com/showthread...hreadid=556166





All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com