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

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

RB Smissaert

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
 
R

Riyas Majeed

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

RB Smissaert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top