Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ActiveSheet.QueryTables.Add | Excel Programming | |||
ActiveSheet.QueryTables.Add | Excel Programming | |||
help with ActiveSheet.QueryTables.Add Connection: | Excel Programming | |||
ActiveSheet.QueryTables.Add using a File DSN | Excel Programming | |||
With ActiveSheet.QueryTables.Add | Excel Programming |