msquery prompt for password

J

jocke

hi, is it possible to use the shell command to send a password t
msquery when msquery prompts for password when updating query.

i usually open databases with ado but in this case i cannot do so.
And i'd like to refresh the query automatically when file opens
 
A

Ardus Petus

Edit the "connection" property of your Querytable, and add
";password=whatever"

HTH
 
J

jocke

i don't create the query in vba i have it in a worksheet.
how can i edit the connection property then?


this is my code

With ActiveSheet.QueryTables("testdata")
Refresh BackgroundQuery:=False
End With

/jocke
 
J

jbrackett

Right-click somewhere in your dataset > Data Range Properties... > Sav
password...

Another one I check is to "Fill down formulas in adjacent columns...
at the bottom of the dialog box. This is great for grouping o
conditioning data for use in pivot tables. (Example: a date cell to
month or day of week or using a nested if to return values)

Regards,

Ja
 
Top