Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Importing text data from the web

With Excel 2003 I am importing data from the WEB. This works fine if the file
exists, but not if it doesn't. I would like my macro to be able to handle
both cases. Guess what I am asking is there a way to check and see whether
or not a file exists so I can handle it accordingly.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Importing text data from the web

If you create the object "MSXML2.XMLHTTP", there is a GET method that will
return status text (OK if the URL is available).

For an example in script that can easily be incorporated into your VBA, take
a look at
http://www.microsoft.com/technet/scr...5/hey0222.mspx

Steve



"Lawood" wrote in message
...
With Excel 2003 I am importing data from the WEB. This works fine if the
file
exists, but not if it doesn't. I would like my macro to be able to handle
both cases. Guess what I am asking is there a way to check and see
whether
or not a file exists so I can handle it accordingly.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Importing text data from the web

Thanks. This worked fine. Maybe not significant but I noticed this process
does not ask for my Web Site USERID/PASSWORD (the web site data is returned)
whereas the Import data does.

"Steve Yandl" wrote:

If you create the object "MSXML2.XMLHTTP", there is a GET method that will
return status text (OK if the URL is available).

For an example in script that can easily be incorporated into your VBA, take
a look at
http://www.microsoft.com/technet/scr...5/hey0222.mspx

Steve



"Lawood" wrote in message
...
With Excel 2003 I am importing data from the WEB. This works fine if the
file
exists, but not if it doesn't. I would like my macro to be able to handle
both cases. Guess what I am asking is there a way to check and see
whether
or not a file exists so I can handle it accordingly.




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
Importing data with Text Wizard Jim Excel Discussion (Misc queries) 3 February 25th 08 01:58 AM
Importing Text Data mfx_krypt Excel Discussion (Misc queries) 11 September 27th 05 08:00 PM
IMPORTING TEXT DATA Bill C Excel Discussion (Misc queries) 1 May 12th 05 10:05 AM
Importing Text Data into Excel SowBelly Excel Programming 2 July 30th 04 11:29 AM
Importing data from text files Jeff Armstrong Excel Programming 3 October 28th 03 01:35 AM


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