I have an Excel file where it is connected to multiple tables from an SQL Server. This is how I connected it.
Data Connection.png
All the tables are loaded fine on the sheet, however these tables are a reference to specific actions on Excel so they need to be up to date on Excel itself. The sheet is going to be used by multiple users, so I have set a macro that when they press a button all tables gets refreshed in their Excel files so the data is always up to date.
It works perfectly for me as I have a username and password for the database, however these users don't have a username and password. Once they click the button to refresh the data, they get a pop up to enter the database credentials.
PN8QD.png
What I am trying to do is apply my own credentials in the VBA code of that button, so once they click the refresh button, all tables in excel gets refreshed and excel doesn't ask the user for credentials.
If anyone has a way of doing it, please let me know.
Thanks.
Bookmarks