Refresh MS Query

Herbiec09

Active Member
Joined
Aug 29, 2006
Messages
250
Hi All,

I am using the following simple VBA to refresh an MS Query when opening an Excel spreadsheet (Because one of my users has a MAc so I cant use Power Query):

Option Explicit

Private Sub Workbook_Open()

ThisWorkbook.RefreshAll
End Sub



The refressh works, but requires me to enter the password, however I d not want users to have to enter a password everytime they open the spreadsheet. Can someone assist with a modification to the code so that it also inputs the password "query" and the runs and the user does not have to enter the password manually

Thank you

Herbz
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Watch MrExcel Video

Forum statistics

Threads
1,099,267
Messages
5,467,657
Members
406,545
Latest member
puneet829

This Week's Hot Topics

Top