Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - DOS COMMAND using Shell ?

Status
Not open for further replies.

marco02

Programmer
Feb 19, 2002
35
US
Hi guys,

I would like to run 1 or 2 DOS commands from in my ExcelVBA application.

I red somewhere that:
Shell "COMMAND.COM dos_command_as_a_string"
should do it.

It doesn't seem to work, can somebody help me on this matter? Thanks a lot,

Marco

PS: i want to convert a file from .jpg to .png using IFRANVIEW. My dos commands are gonna be:
- cd ifranview
- i_view32.exe c:\dummy.jpg /convert=c:dummy.png

thks!


 
I would suggest that since you have multiple DOS commands that you have to execute, that you build a DOS .BAT file which contains all of the DOS commands.

Then from VB

Shell "bat_filename"

Good Luck
------------
Select * from Users where Clue > 0
0 rows returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top