ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using START, CALL etc commands in Shell gives me error "Run TimeError 53; File Not Found". (https://www.excelbanter.com/excel-programming/446956-using-start-call-etc-commands-shell-gives-me-error-run-timeerror-53%3B-file-not-found.html)

Riyas Majeed

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" ??

RB Smissaert[_2_]

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" ??



Riyas Majeed

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 :-|

RB Smissaert[_2_]

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 :-|



RB Smissaert[_2_]

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 :-|




All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com