ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Edit Query Window (https://www.excelbanter.com/excel-programming/401127-edit-query-window.html)

LightShow

Edit Query Window
 
I was wondering if there is a way to open the web query window (Data -
Import External Data - New Web Query or Edit Query if one exists) through
VBA?

Colby Africa

Edit Query Window
 
Hello,

Aside from using SendKeys, I don't think there is way to do this
programmatically.

Colby

LightShow

Edit Query Window
 
Use sendkeys and go throught the menus? That would be alot of sendkeys, or
can I use a sendkey on a specific cell that contains the query?

"Colby Africa" wrote:

Hello,

Aside from using SendKeys, I don't think there is way to do this
programmatically.

Colby


Colby Africa

Edit Query Window
 
Describe what the end results should be. You can programmatically
create web queries fairly easily. Do you want to force the user to do
this manually?


Don Guillett

Edit Query Window
 
If you want to change the query, do it first with a variable and have your
macro do the fetch

With Sheets(2).QueryTables.Add(Connection:="URL;" _
& "http://finance.yahoo.com/d/quotes.csv?s=" & _
mysmbol & "&f=snd1t1l1ohgpvqyd&e=.csv", _

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"LightShow" wrote in message
...
I was wondering if there is a way to open the web query window (Data -
Import External Data - New Web Query or Edit Query if one exists) through
VBA?



LightShow

Edit Query Window
 
Here is my problem. I have a series of webqueries that are created through
vba, but the URL requires the user to login through a different page first,
which I cannot pass the username and password through the url. So I have a
script to see if they are login or or not (using webquery) if not, I wanted
to open the webquery to have them login. I used the following sendkeys which
seemed to work.

Application.SendKeys ("%DDE")


"Colby Africa" wrote:

Describe what the end results should be. You can programmatically
create web queries fairly easily. Do you want to force the user to do
this manually?



Colby Africa

Edit Query Window
 
I get it. Problem solved?


All times are GMT +1. The time now is 09:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com