ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   running windows system commands in VBA (https://www.excelbanter.com/excel-programming/290340-running-windows-system-commands-vba.html)

tomek

running windows system commands in VBA
 
Hi,
does anyone know whether it's possible and how (if so) to run Windows
system commands in VBA? What I want to do is run "dir *.xls /s/w/b
dir.txt" command and use the list of files created by this command. The
same result (and it'd be even more useful for me) I'd achieve if I could
use some command or function enabling me to run through file system on a
PC searching for *.xls files. I need something like FindFirst and
FindNext known in Pascal or C, or Delphi, or other programming
languages, something what'd give me names of excel files stored on HDD
in different subdirectories together with their full path.
I don't ask for a complete code, just name commands I could use, please.
Thanks a lot in advance! Tomek

tomek

running windows system commands in VBA
 
Hi again,
I've found all the information I need in "Files in a dir" thread. I don't
know how I could miss it when I searched for tips in all messages.....
Sorry for unnecessary posting...


"tomek" wrote in message
...
Hi,
does anyone know whether it's possible and how (if so) to run Windows
system commands in VBA? What I want to do is run "dir *.xls /s/w/b
dir.txt" command and use the list of files created by this command. The






All times are GMT +1. The time now is 07:54 PM.

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