Ok Im playing around with excel.. and
in vb I haveVB Code:
'more code.. above this If Range("U2") = "" Then GoTo Line1 Else With ActiveSheet.QueryTables.Add(Connection:="URL;[""item""]", Destination:=dest) .RefreshStyle = xlOverwriteCells .AdjustColumnWidth = False With ActiveSheet.QueryTables(1).Parameters(1) .SetParam xlRange, Range("U2") End With .BackgroundQuery = True .Refresh End With 'more code below.
Now the code above is to grab a full http address from each cell one at a time and return in my excel page.. this works if I were to.. make the cells single digits like..
http://www.example.com/testpg?tp=1&lala=12
http://www.example.com/testpg?tp=2&lala=12
http://www.example.com/testpg?tp=3&lala=12
If I were to only use 1, 2, 3 for the [""item''] part..
like so..
VB Code:
With ActiveSheet.QueryTables.Add(Connection:="URL;[url]http://www.example.com/testpg?tp=[/url][""item""]&lala=12", Destination:=dest)
It works fine..
But if I use the [""item'''] part to grab the cell with the entire...
http://www.example.com/testpg?tp=1&lala=12
it doesnt work.. and I've checked the http: url link after its tried and what it does is turns my url into this...
http://www.example.com/testpg?tp%3D1%26lala%3D12
causing it to not find the correct URL.
My quest is why does it turn ='s signs into %3D and & signs into %26
and how do I prevent it from doing this?
Thanks much apprieciated!!!!!!!!!!!!!
( I posted this elsewhere once and found a note to post it in the classic section.. sorry guys new as of today)




Reply With Quote