Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using START, CALL etc commands in Shell gives me error "Run TimeError 53; File Not Found".

My Code is like

Sub test()
FName = "D:\ARKQ.html"
Shell "start " & FName
End Sub

But when I run this code, it gives me File Not Found Error. Please help me with this error. The same happens with "call" command also.

even if I simply run the code:
Shell "start"
it shows the same error, so I assume I have to give the full path of the program "start" ??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Using START, CALL etc commands in Shell gives me error "Run Time Error 53; File Not Found".

Something like this should work:

Sub test()

Dim strFile As String

strFile = "D:\ARKQ.html"
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE " & """" & strFile
& """", 1

End Sub


RBS


"Riyas Majeed" wrote in message
...
My Code is like

Sub test()
FName = "D:\ARKQ.html"
Shell "start " & FName
End Sub

But when I run this code, it gives me File Not Found Error. Please help me
with this error. The same happens with "call" command also.

even if I simply run the code:
Shell "start"
it shows the same error, so I assume I have to give the full path of the
program "start" ??


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using START, CALL etc commands in Shell gives me error "Run TimeError 53; File Not Found".

Hi, thanks a lot for replying..
but doing as you suggested, opens a NEW browser window each time my code runs..
I want to open the html file in the same browser window, in a new tab may be..
can you help me with that? can your code be modified to fit the purpose..

In the cmd "start" command works perfectly..but i cant get it working in excel :-|
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Using START, CALL etc commands in Shell gives me error "Run Time Error 53; File Not Found".

I am sure it is possible, but have no ready made code at
hand and will need to Google this.
Normally you would use GetObject etc., but not sure
that will work with IExplorer. You probably will need
a Windows API.

RBS


"Riyas Majeed" wrote in message
...
Hi, thanks a lot for replying..
but doing as you suggested, opens a NEW browser window each time my code
runs..
I want to open the html file in the same browser window, in a new tab may
be..
can you help me with that? can your code be modified to fit the purpose..

In the cmd "start" command works perfectly..but i cant get it working in
excel :-|


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Using START, CALL etc commands in Shell gives me error "Run Time Error 53; File Not Found".

This webpage seems to have the information to sort this out:
http://vba-corner.livejournal.com/4623.html

RBS


"Riyas Majeed" wrote in message
...
Hi, thanks a lot for replying..
but doing as you suggested, opens a NEW browser window each time my code
runs..
I want to open the html file in the same browser window, in a new tab may
be..
can you help me with that? can your code be modified to fit the purpose..

In the cmd "start" command works perfectly..but i cant get it working in
excel :-|


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
VBA.Interaction.Shell ("msg.exe") = Run-time error '53': File Not found CTB Excel Programming 1 April 18th 12 09:29 PM
Getting a "File Not Found" error when trying to show userform Bruce[_2_] Excel Programming 1 June 7th 07 08:30 PM
Need Help with Call Shell("cmd /K netstat") Function!!! [email protected] Excel Programming 4 August 24th 06 12:58 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
"file not found" error message when launching source file Lisa[_9_] Excel Programming 4 April 6th 04 02:54 PM


All times are GMT +1. The time now is 07:48 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"