Disable external data connection for other users

rins

New Member
Joined
May 17, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, I’m using a simple notepad .vbs macro to refresh all spreadsheets in the folder which is scheduled to refresh twice a day by task scheduler.
The data source of the report is SQL server and hence I’ll have to leave OLE DB refresh option enabled to make sure the data remains up-to-date.
When a colleague of mine open the report today, he clicked on enable content and SQL server login window popped up on the screen.
I need to send the report out once every week to internal & external people once it gets refreshed by the task scheduler.
How can I disable external connection in the report for other users without using macro?
Is there any vbs coding for the notepad that can only activate SQL external connection just before a refresh command and once the refresh is completed it saves, closes and leaves the spreadsheet with disable external connection so other user don’t see SQL server Login pop up on their screen?
I am new to VBA so if above option not possible, any other alternative method will be hugely appreciated.
Thank you.
 

Attachments

  • B39F8C5E-A873-4CBF-ABD0-791889BB0661.png
    B39F8C5E-A873-4CBF-ABD0-791889BB0661.png
    22.3 KB · Views: 7

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,143,687
Messages
5,720,293
Members
422,275
Latest member
Maria95

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top