"Edit Query" control in the "External Data" toolbar

Joined
May 25, 2006
Messages
1
Reaction score
0
I am desperately trying to come up with some VBA code that will open a web page by running or launching or activating or whatever... the "Edit Query" control in the "External Data" toolbar. Does anyone know how to do this? The only way I can make it work is by clicking on "Edit Query" but I really wanted to link this action to a Command Button.


I've tried recording several macros. It doesn't seem to work. I believe a connection to the https server is made when calling the "Refresh" method of the "QueryTable" object. When this method is called, Excel connects to the source specified by the "Connection" property. I just can't seem to get the code working...I want to code to call the "Edit Query" action.

Thanks,
Ryan---

PS, this is what I have now...

Sub Macro1()

Range("A2:AV500").Clear

Range("A5").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;
https://
......................................and some other stuff..........
End With
End Sub



That's pretty much it.
Please see if you can help.
Much thanks!!!
Ryan---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top