ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   msquery prompt for password (https://www.excelbanter.com/excel-discussion-misc-queries/78026-msquery-prompt-password.html)

jocke

msquery prompt for password
 

hi, is it possible to use the shell command to send a password to
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.


--
jocke
------------------------------------------------------------------------
jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=523663


Ardus Petus

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

HTH
--
AP

"jocke" a écrit dans le
message de ...

hi, is it possible to use the shell command to send a password to
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.


--
jocke
------------------------------------------------------------------------
jocke's Profile:

http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=523663




jocke

msquery prompt for password
 

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


--
jocke
------------------------------------------------------------------------
jocke's Profile: http://www.excelforum.com/member.php...nfo&userid=766
View this thread: http://www.excelforum.com/showthread...hreadid=523663


jbrackett

msquery prompt for password
 

Right-click somewhere in your dataset Data Range Properties... Save
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 or
conditioning data for use in pivot tables. (Example: a date cell to a
month or day of week or using a nested if to return values)

Regards,

Jay


--
jbrackett
------------------------------------------------------------------------
jbrackett's Profile: http://www.excelforum.com/member.php...o&userid=32577
View this thread: http://www.excelforum.com/showthread...hreadid=523663



All times are GMT +1. The time now is 03:02 PM.

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