LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ActiveSheet.QueryTables.Add using InputBox and/or a URL list in a .txt file list


Hello everyone !
here is a new trick for all of vba programmers out there.

So far in my macro, I got this line:
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.xxx.com/mypage/thispage.htm" _
, Destination:=Range("A1"))

Here are my two questions:

== 1st case : using InputBox function, I would like to ask via a
msgbox for the URL address. And then, VBA would put this var into the
ActiveSheet.QueryTables.Add.

I've tried to do this way, but I got an error msg saying that "this is
not a valid URL adress". Why?

_______
Address = InputBox("Type in the URL Adress of the website page",
"Automatic Data Importation")

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;Address" _
, Destination:=Range("A1"))
________

How can I do that ?

== Now 2nd solution: I got a .txt file (it could also be into an excel
sheet btw) in which there are 500 URL adresses, and I would like VBA to
import the first address, execute the macro by putting this first
address in the ActiveSheet.QueryTables.Add, then use the second adress
etc etc..


Thanks for your appreciated *help*
Crazy


--
crazy_vba
------------------------------------------------------------------------
crazy_vba's Profile: http://www.excelforum.com/member.php...o&userid=33679
View this thread: http://www.excelforum.com/showthread...hreadid=537500

 
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
ActiveSheet.QueryTables.Add Rick Excel Programming 4 November 10th 05 04:24 AM
ActiveSheet.QueryTables.Add quartz[_2_] Excel Programming 0 November 9th 05 07:18 PM
help with ActiveSheet.QueryTables.Add Connection: uriel78 Excel Programming 1 March 6th 05 04:08 PM
ActiveSheet.QueryTables.Add using a File DSN Brian Howenstein Excel Programming 1 April 6th 04 11:45 AM
With ActiveSheet.QueryTables.Add [email protected] Excel Programming 4 January 6th 04 04:58 PM


All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"