ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shelling out to DOS (https://www.excelbanter.com/excel-programming/344375-shelling-out-dos.html)

Denny

Shelling out to DOS
 
Can I run a batch file before or as I shell out of Excel...or can I change
the directory AND the prompt from VBS. I changed the directory, but can I
add a prompt change. This was my directory change.
ChDir "C:\my documents\"
Shell Environ ("comspec" & " /k ", vb MaximizedFocus

Denny

Shelling out to DOS
 
I want to add to what I wanted. I have figured out how to add color. I'll
put that under color, but this is where I am as I shell out and something
like the prompt I want.

ActiveWorkbook.Close

ChDir "c:\my documents\"

Shell Environ("comspec") & " /k ", vbMaximizedFocus

'how long does your .bat file take to execute?
Application.Wait Now + TimeSerial(0, 0, 20) '20 seconds


HOW CAN I SET THE PROMPT AS I GO OUT TO WINDOWS. THIS IS SOMETHING LIKE I
WANT IT TO SAY.
@echo off

prompt $e[5;30;47m$p$g To SEARCH: Type F and one search word____$e[1;30;44m
cls

cls



"denny" wrote:

Can I run a batch file before or as I shell out of Excel...or can I change
the directory AND the prompt from VBS. I changed the directory, but can I
add a prompt change. This was my directory change.
ChDir "C:\my documents\"
Shell Environ ("comspec" & " /k ", vb MaximizedFocus



All times are GMT +1. The time now is 01:14 AM.

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