LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default Issuing DOS command in VBA macro?

To read files from my hard disk into a spreadsheet I run a batch file like:

dir "G:\My Music\Comedy\*.*" c:\temp.prn
pause

dir "G:\My Music\Compilations\*.*" c:\temp.prn
pause

dir "G:\My Music\Country\*.*" c:\temp.prn
pause

Then at each pause I change the focus to the spreadsheet and type Ctrl-H,
which runs the import macro. It would simplify things greatly if I could
issue the commands in a macro and have all run in one step. I know issuing
a command is easy in regular programming languages. What is involved to do
so in VBA? (I'm using Excel 2002.)

Don <donwiss at panix.com.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
Issuing opening files wtaipan Excel Discussion (Misc queries) 1 November 27th 09 05:24 PM
How to run a macro with the IF command deancarpenter Excel Worksheet Functions 4 July 26th 07 08:32 AM
Macro Command VickyC Excel Discussion (Misc queries) 1 December 2nd 05 01:05 AM
Issuing macro in workbook from separate workbook Nigel Excel Discussion (Misc queries) 1 May 16th 05 05:46 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"