Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
fileopen
Hi,
Can anyone please tell me why this code is working: fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "c:\04987.ecw", 4) and this code is not: dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "directory", 4) They both open the application, the first one open the file also, but the second one doesn't. Thanks, Afshin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
fileopen
Hi at a quick glance try the following,
dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & directory , 4) by placing "" around directory you made it a string rather than a variable Cheers JulieD "A-Design" wrote in message ... Hi, Can anyone please tell me why this code is working: fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "c:\04987.ecw", 4) and this code is not: dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "directory", 4) They both open the application, the first one open the file also, but the second one doesn't. Thanks, Afshin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
fileopen
Thanks for the quick answer
"JulieD" wrote in message ... Hi at a quick glance try the following, dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & directory , 4) by placing "" around directory you made it a string rather than a variable Cheers JulieD "A-Design" wrote in message ... Hi, Can anyone please tell me why this code is working: fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "c:\04987.ecw", 4) and this code is not: dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "directory", 4) They both open the application, the first one open the file also, but the second one doesn't. Thanks, Afshin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
fileopen
you're welcome, does it work?
"A-Design" wrote in message ... Thanks for the quick answer "JulieD" wrote in message ... Hi at a quick glance try the following, dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & directory , 4) by placing "" around directory you made it a string rather than a variable Cheers JulieD "A-Design" wrote in message ... Hi, Can anyone please tell me why this code is working: fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "c:\04987.ecw", 4) and this code is not: dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "directory", 4) They both open the application, the first one open the file also, but the second one doesn't. Thanks, Afshin |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
fileopen
Yes ,Thanks.
"JulieD" wrote in message ... you're welcome, does it work? "A-Design" wrote in message ... Thanks for the quick answer "JulieD" wrote in message ... Hi at a quick glance try the following, dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & directory , 4) by placing "" around directory you made it a string rather than a variable Cheers JulieD "A-Design" wrote in message ... Hi, Can anyone please tell me why this code is working: fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "c:\04987.ecw", 4) and this code is not: dim directory as string directory = "c:\04987.ecw" fileopen = Shell("C:\Program Files\EC55\ec55.exe " & "directory", 4) They both open the application, the first one open the file also, but the second one doesn't. Thanks, Afshin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Test fileOpen | Excel Programming | |||
Macro to run on fileopen for all workbooks | Excel Programming | |||
Using FileOpen | Excel Programming | |||
Selecting a file path in Excel VBA using FileOpen dialog | Excel Programming |