Hello,
How do I open a .exe file that resides on the c drive.
C:\windows\convert.exe
This is a file of a conversion chart
Thanks EMoe
Hello,
How do I open a .exe file that resides on the c drive.
C:\windows\convert.exe
This is a file of a conversion chart
Thanks EMoe
Have a look in VBA help for SHELL.
--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"EMoe" <EMoe.215ysb_1136468108.2154@excelforum-nospam.com> wrote in message
news:EMoe.215ysb_1136468108.2154@excelforum-nospam.com...
>
> Hello,
>
> How do I open a .exe file that resides on the c drive.
>
> C:\windows\convert.exe
>
> This is a file of a conversion chart
>
> Thanks EMoe
>
>
> --
> EMoe
> ------------------------------------------------------------------------
> EMoe's Profile:
> http://www.excelforum.com/member.php...o&userid=23183
> View this thread: http://www.excelforum.com/showthread...hreadid=498262
>
i had the same question as you. i found this in another post
Dim sAcrobat As String
sAcrobat = "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"
Shell sAcrobat
i had the same question as you. i found this in another post
Dim sAcrobat As String
sAcrobat = "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe"
Shell sAcrobat
Thanks for the tip Don & for your input Paul!
Don it searched the helps section, and found it to be helpful.
This is what I came up with.
Sub OpenConvertMe()
Dim RetVal
RetVal = Shell("C:\WINDOWS\Convert.EXE", 1)
End Sub
This worked fine. Question though, what does the ,1 mean in this code?
Thanks,
EMoe![]()
The '1' in the Shell function indicates that the window should
have normal focus. In VBA, press F2 to open the object browser,
and search for VbAppWinStyle and you'll see all the possible
symbolic constants that can be used in the Shell function. and
the numeric value of those constants.
It is poor programming practice to use the numeric value of a
constant in place of the name.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"EMoe" <EMoe.2165yn_1136477410.5908@excelforum-nospam.com> wrote
in message
news:EMoe.2165yn_1136477410.5908@excelforum-nospam.com...
>
> Thanks for the tip Don & for your input Paul!
>
> Don it searched the helps section, and found it to be helpful.
>
> This is what I came up with.
>
> Sub OpenConvertMe()
> Dim RetVal
> RetVal = Shell("C:\WINDOWS\Convert.EXE", 1)
> End Sub
>
> This worked fine. Question though, what does the *,1* mean in
> this
> code?
>
> Thanks,
> EMoe
>
>
> --
> EMoe
> ------------------------------------------------------------------------
> EMoe's Profile:
> http://www.excelforum.com/member.php...o&userid=23183
> View this thread:
> http://www.excelforum.com/showthread...hreadid=498262
>
Hi Chip,
> It is poor programming practice to use the numeric value of a
> constant in place of the name.
Apart from readability, are there other reasons ?
Regards,
Peter T
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks