Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Open a file from excel-2

Can anyone please tell me how should I write my codes to open a file like
the example below?what ever I tried ,this doesn't work.

Sub test_1()

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE" &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Open a file from excel-2

This does work for me:

fileOpen = Shell("C:\WINDOWS\notepad.exe " & "c:\test.txt",
vbMaximizedFocus)

Also, I notice that you forget the space after the *.exe file, you should be
trying to achieve a string like this:

"c:\Program Files\EC55\EC55.EXE
\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw"

which means that you should write this:

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE " &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

However, I have never tried to use this code with an unmapped server
address, so can't guarantee it'll work after you correct the code.

regards,
KL

"A-Design" wrote in message
...
Can anyone please tell me how should I write my codes to open a file like
the example below?what ever I tried ,this doesn't work.

Sub test_1()

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE" &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Open a file from excel-2

KL,

With this new string and also the old one I can call the program that I want
but the file that I specified doesn't open on that program until I go to
menu and try to open it that way, although out side of the excel with just a
simple double click on the file I can have it open by that program.

Thanks,
Afshin.


"KL" wrote in message
...
This does work for me:

fileOpen = Shell("C:\WINDOWS\notepad.exe " & "c:\test.txt",
vbMaximizedFocus)

Also, I notice that you forget the space after the *.exe file, you should
be trying to achieve a string like this:

"c:\Program Files\EC55\EC55.EXE
\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw"

which means that you should write this:

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE " &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

However, I have never tried to use this code with an unmapped server
address, so can't guarantee it'll work after you correct the code.

regards,
KL

"A-Design" wrote in message
...
Can anyone please tell me how should I write my codes to open a file like
the example below?what ever I tried ,this doesn't work.

Sub test_1()

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE" &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

End Sub





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Open a file from excel-2

Kl,
Please disregard my previous post, the new string works perfect, the problem
was the file name.
Thanks
Afshin


"KL" wrote in message
...
This does work for me:

fileOpen = Shell("C:\WINDOWS\notepad.exe " & "c:\test.txt",
vbMaximizedFocus)

Also, I notice that you forget the space after the *.exe file, you should
be trying to achieve a string like this:

"c:\Program Files\EC55\EC55.EXE
\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw"

which means that you should write this:

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE " &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

However, I have never tried to use this code with an unmapped server
address, so can't guarantee it'll work after you correct the code.

regards,
KL

"A-Design" wrote in message
...
Can anyone please tell me how should I write my codes to open a file like
the example below?what ever I tried ,this doesn't work.

Sub test_1()

FILEOPEN = Shell ("c:\Program Files\EC55\EC55.EXE" &
"\\Server\job-dwg-calc\2004\A3-ENERCALC\04021.ecw", vbMaximizedFocus)

End Sub





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
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
Excel hangs when trying to open a file but it's ok if i open exce. jomary Excel Discussion (Misc queries) 0 October 18th 06 05:14 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


All times are GMT +1. The time now is 06:12 AM.

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"