ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA.Interaction.Shell ("msg.exe") = Run-time error '53': File Not found (https://www.excelbanter.com/excel-programming/445816-vba-interaction-shell-msg-exe-%3D-run-time-error-53-file-not-found.html)

CTB

VBA.Interaction.Shell ("msg.exe") = Run-time error '53': File Not found
 
Using:
Windows 7 Professional x64
MS Excel 2010 (x32)

Hello all,

When I try to use MSG.exe in VBA with VBA.Interaction.Shell, I get "File not found". When I use MSG.EXE from a command window, everything works fine.

Anyone know what is going on? Has anyone come across this? Anyone know how to get this to work or know of a work-around?

Thanks for any help anyone can provide,

CTB

GS[_2_]

VBA.Interaction.Shell ("msg.exe") = Run-time error '53': File Not found
 
CTB explained on 4/18/2012 :
Using:
Windows 7 Professional x64
MS Excel 2010 (x32)

Hello all,

When I try to use MSG.exe in VBA with VBA.Interaction.Shell, I get "File not
found". When I use MSG.EXE from a command window, everything works fine.

Anyone know what is going on? Has anyone come across this? Anyone know how
to get this to work or know of a work-around?

Thanks for any help anyone can provide,

CTB


Take a look at using VBA's Shell() function -OR- the ShellExecute() API
function. Note that both require a full path and filename!

Example:
Shell "fullpath\MSG.exe" 'starts MSG app

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 04:29 AM.

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