Does anyone have any suggestions on following macro coding?

[Working]
With Sheets("Temp").QueryTables.Add(Connection:= _
"URL;http://www.stata.com/help.cgi?macro",
Destination:=Sheets("Temp").Range("$A$1"))

[Not working]
myVariable = "http://www.stata.com/help.cgi?macro"
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & myVariable, _
Destination:=sheets("Temp").Range("A1"))

It seems to me that
"URL;" & myVariable is not equal to
"URL;http://www.stata.com/help.cgi?macro".

Do anyone have any suggestions on how to solve it?
Thank you very much for any suggestions
Eric

Re: Help on macro coding for URL by Dave

Dave
Sat Mar 15 07:44:38 CDT 2008

Check your other post.

Eric wrote:
>
> Does anyone have any suggestions on following macro coding?
>
> [Working]
> With Sheets("Temp").QueryTables.Add(Connection:= _
> "URL;http://www.stata.com/help.cgi?macro",
> Destination:=Sheets("Temp").Range("$A$1"))
>
> [Not working]
> myVariable = "http://www.stata.com/help.cgi?macro"
> With ActiveSheet.QueryTables.Add(Connection:= _
> "URL;" & myVariable, _
> Destination:=sheets("Temp").Range("A1"))
>
> It seems to me that
> "URL;" & myVariable is not equal to
> "URL;http://www.stata.com/help.cgi?macro".
>
> Do anyone have any suggestions on how to solve it?
> Thank you very much for any suggestions
> Eric

--

Dave Peterson

Re: Help on macro coding for URL by Don

Don
Sat Mar 15 09:02:44 CDT 2008


I gave you the solution on your OTHER post. Pls don't post in more than one.
Proper place is programming for this
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
"Eric" <Eric@discussions.microsoft.com> wrote in message
news:F58500AA-492A-40B5-98CA-80F226169B63@microsoft.com...
> Does anyone have any suggestions on following macro coding?
>
> [Working]
> With Sheets("Temp").QueryTables.Add(Connection:= _
> "URL;http://www.stata.com/help.cgi?macro",
> Destination:=Sheets("Temp").Range("$A$1"))
>
> [Not working]
> myVariable = "http://www.stata.com/help.cgi?macro"
> With ActiveSheet.QueryTables.Add(Connection:= _
> "URL;" & myVariable, _
> Destination:=sheets("Temp").Range("A1"))
>
> It seems to me that
> "URL;" & myVariable is not equal to
> "URL;http://www.stata.com/help.cgi?macro".
>
> Do anyone have any suggestions on how to solve it?
> Thank you very much for any suggestions
> Eric
>