Ask Question Forum:
C
O
M
P
U
T
E
R
2
8
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Y-position of the mouse cursor
Attachment:===
I am having trouble opening a .bat file in a VBA Excel Macro

Sub OpenFile()
Dim RetVal
RetVal = Shell("C:MyMonitorMonitorstartMonitorLinux.bat", 1)
End Sub
The code opens the command window but I get a path not recognized error. If I go to the file directly and double click it the file opens without a problem. Please help
FYI I am still learning VB so please keep any responses in laymens terms
Thanks
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?
The line:
CD c:MyMonitorMonitor
should be on a line by itself.
When you say "when the file is just opened directly.", how are you doing that? Are you using explorer to navigate to where the bat file is? What is the full path of the folder where the bat file is being launched from?