Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
Excel hangs when trying to open a file but it's ok if i open exce. | Excel Discussion (Misc queries) | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
Open email windows can't open, excel shreadsheet file .xls ? | Excel Discussion (Misc queries) | |||
How do I stop Excel from closing the open file each time I open a. | Setting up and Configuration of Excel |