How to hide the location of a data source

dbrault57

New Member
Joined
Oct 10, 2022
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
Since the Application.CommandBars Visible / Enabled seems to not work anymore, I was wondering if it was possible to hide or disable certain menu items from the ribbon?
In fact, I want to hide the location of a specific data file used as a target for Power Query and didn't find a way to do it, and cannot avoid any open-minded user to seek the location and modify this file manually.
Thanks in advance
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
What is done with the file once the linked data is refreshed? Like, do you distribute it as a report or is it a template that is used by others and they need to hold connection to the source data?
 
Upvote 0
Hi Johnny,
It's like a user form to enter values that are posted to another "target file", but I don't want all users that access this form to see where the target file is located.
In the meantime, I found a solution:
  • in the Sub Workbook_Open code
  • I added a dynamic modification of the Excel.officeUI parameter file located in the C:\Users\xxx\AppData\Local\Microsoft\Office folder
  • to include this tags
<mso:tabs>
<mso:tab idQ="mso:TabData">
<mso:group idQ="mso:GroupPowerQueryData" visible="false"/>
<mso:group idQ="mso:GroupConnections" visible="false"/>
</mso:tab>
</mso:tabs>

  • In the Sub Workbook_BeforeClose code, I reset the previous values to True
And it works perfectly
Thanks
 
Upvote 0
Solution

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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
Back
Top