#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test fileOpen Luis Excel Programming 1 August 5th 04 02:04 AM
Macro to run on fileopen for all workbooks aarti Excel Programming 1 May 21st 04 01:37 PM
Using FileOpen Tippy Excel Programming 1 March 4th 04 06:55 PM
Selecting a file path in Excel VBA using FileOpen dialog John Robinson Excel Programming 1 November 1st 03 09:59 AM


All times are GMT +1. The time now is 02:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"