C
crazy_vba
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
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