Using START, CALL etc commands in Shell gives me error "Run TimeError 53; File Not Found".

  • Thread starter Thread starter Riyas Majeed
  • Start date Start date
R

Riyas Majeed

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" ??
 
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
 
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 :-|
 
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
 
Back
Top