Consulting

Results 1 to 2 of 2

Thread: Refresh MS Query - Password Issue

  1. #1

    Refresh MS Query - Password Issue

    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 refresh works, but requires me to enter the sql database password, however I do not want users to have to enter a password every time 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.

    Or is there an alternative way around this? I can't use Power Query because one of the main users uses a Mac.

    The spreadsheet will be housed on a shared drive.

    Thank you

    HerbieC

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Moderator Bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •