Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using OpenText method for opening a text file from the Internet location (so the file is something like http://www.x.y/file.txt). Everything is fine except when the file/page is not found I get a message like "could not open ..." that I want to avoid but I don't know how. I have an error handler that deals with it but the message still shows first and the error handler is processed after clicking OK. Is there any way I can avoid the message or check if the file/page exists? thanks very much regards, dejan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub test() Application.DisplayAlerts = False On Error Resume Next Workbooks.OpenText "http://www.xxxgoogle.co.uk/" Application.DisplayAlerts = True End Sub RBS "Dejan" wrote in message ups.com... Hi, I am using OpenText method for opening a text file from the Internet location (so the file is something like http://www.x.y/file.txt). Everything is fine except when the file/page is not found I get a message like "could not open ..." that I want to avoid but I don't know how. I have an error handler that deals with it but the message still shows first and the error handler is processed after clicking OK. Is there any way I can avoid the message or check if the file/page exists? thanks very much regards, dejan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great, I didn't even try using DisplayAlerts. It works fine. Thank you
very much regards, dejan RB Smissaert je napisao/la: Try this: Sub test() Application.DisplayAlerts = False On Error Resume Next Workbooks.OpenText "http://www.xxxgoogle.co.uk/" Application.DisplayAlerts = True End Sub RBS "Dejan" wrote in message ups.com... Hi, I am using OpenText method for opening a text file from the Internet location (so the file is something like http://www.x.y/file.txt). Everything is fine except when the file/page is not found I get a message like "could not open ..." that I want to avoid but I don't know how. I have an error handler that deals with it but the message still shows first and the error handler is processed after clicking OK. Is there any way I can avoid the message or check if the file/page exists? thanks very much regards, dejan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check if a File Exists | Excel Programming | |||
Check if file exists | Excel Discussion (Misc queries) | |||
Loadpicture - check if file exists | Excel Programming | |||
How do I check if a sheetname exists in a file? | Excel Programming | |||
check if file exists | Excel Programming |