Disable access to a confidential tab - excel

I would like to send an Excel file to a client with confidential data in the last tab “Use_FeeTR”.
The client should have the ability to change some parameters in the first tabs to run scenarios that will use the confidential tab to calculate some prices, with those prices feeding an output tab for him.
However I don’t want him to see any calculations or info from the last tab.
I did the following:
Hide the last tab and protect the workbook structure with a password
OR Hide in VBA environment with xlsSheetveryHidden
Then protect the cells in the first tabs that are linked to Use Fees so the client cannot see the name of the tab in the formula
It works well, however if he really wants to see the data in the confidential tab, he can still open VBA project, find the name of the tab in VBA project > Micro Excel Objects, open a new tab, enter in the first cell Use_FeeTR!A1 and draw the formulas to see the all values of confidential tab.
Is there a way to hide spreadsheet name in VBA project > Micro Excel Objects? or can I disable VBA for this file (restricting access to VBA project with a password)? I tried to "lock project project from viewing" in VBA Properties but I can still see that tab names in Object list

Related

Can I protect a single Worksheet in excel to make it unviewable for other?

I have a shift planner and it can be seen/used by anyone in order to mark down their shifts. I now have created a new Worksheet that calculates how many vacation days each employee has left in order to have a better overview. Since it is law that it should not be viewed by other employees,
I thought of giving that sheet a Password. When I set the Password however, anyone can still see the contents of the sheet.
How can I set it up, so that the sheet cannot be viewed as long as the Password is not correct?
You can make that sheet "very hidden".
Steps to do:
save document as xlsm (with macros)
open the vba-editor (ALT + F11)
set the sheet to very hidden - "very hidden" means that it is not possible to unhide the sheet via the Excel-GUI (like a hidden sheet) - but only via the VBE-GUI.
To prevent users from unhiding via the VBA-Editor:
Select Extras - VBA Project properties (Eigenschaften von VBA-Projekt)
Go to the protection tab and choose to lock project plus add password.
(This protection only works if the file is stored as xlsm.)
Please be aware that there are lots of sources that explain how to crack the VBE-password. If someone wants to see the sheet he or she will be able to. An Excel-file will never be 100 % safe.

How to Get Data on Close Workbook Table on Excel VBA without Openning It?

I have three Workbook,
First is for my Inventory System for Admin,
Second is my Inventory System for Employees, and
Third is my Database.
Does anyone know how to get Data Table on Database without Opening it and put it either in Admin or Employee's Inventory System?
All you need to do is go to "Data" tab in ribbon > Get Data > From File > From Workbook. Then open the "Database" excel file.
This will allows you to preview the data from the "Database" sheet. If you don't need to make any changes you can click load directly and the data will be copied.
You can check out this video for more examples on how to use Power query.
I also recommend checking out this video on how Power Query can help you.

Force Excel to keep sheet name when referencing external tables

Is there a way to force excel from automatically "rewriting" the address of the external reference?
Example
When I mouse over and select a table in another workbook as a source, the formula bar shows this:
=[WorbookName.xlsx]SheetName!TblName
Once I hit enter, the formula bar shows this:
=WorbookName.xlsx!TblName [#Data]
Brackets and sheet names get removed and [#Data] gets added.
I confirmed that excel understands the address with the sheet name by using indirect and forcing excel to use the full reference
=INDIRECT([WorbookName.xlsx]SheetName!TblName)
So its not a limitation by excel. However this only proved that excel can handle that style of reference. The problem is that when you use indirect, youre not actually creating a "link" to the source file, your workbook will never ask to update the values if the source file is closed.
I need to force excel to keep the table name in the reference because I will be uploading to OneDrive and co-authoring the workbook. When you reference a table in another workbook, and that workbook is closed, the reference is changed to include the web address of your OneDrive like this
source file open: =WorbookName.xlsx!TblName [#Data]
source file closed: =https://d.docs.live.net/location/FileName.xlsx'!TableName
I believe this is causing errors, preventing excel from updating the values. when I first open the workbook that contains the links, it will try to update to the latest data. When I use regular ranges, it has no issues. When I use tables, I get "we cant update some of the links in your workbook right now". If you go to edit the links, it looks like this:
Edit Link
If you try to update the values, you are shown this, Notice it is looking for a worksheet but the name its expecting is actually the name of the workbook.
Select Sheet
I believe this is because when you reference a range, the address is written like this:
Rance referance =https ://d.docs.live.net/Loacation/[FileName.xlsx]SheetName!$A$1:$D$20
table referance =https ://d.docs.live.net/location/FileName.xlsx'!TableName
Notice there is a difference in the location of exclamation ! point. I believe this is the reason why excel shows the workbook name as the worksheet is looking for. again if you use indirect, youre able to force excel to use the "long" address, so we know excel recognizes it with no issues.
Really hoping to find a solution, thanks in advance!
This is an alternative to what you're trying to do.
I did some tests and if the file is saved in OneDrive, you could have it open (from OneDrive not locally) and just refresh the data with PowerQuery.
Steps to create the query:
In Chrome:
Locate the source file in Onedrive (aka: https://onedrive.live.com/)
In google Chrome, download the file (we need to get the download link in the next step)
Click the elipsis in Chrome's top right corner and click on Downloads (or press Ctrl + J)
Right click the link of the downloaded file, and select Copy
In Excel...
Click Data | Get Data | From other sources | From web (I don't have the english version right now, but you should be able to locate it)
Paste the URL
Click Ok
Select the Sheet/Table (do any transformation you may require)
Click Close and Load to...
Select a sheet or any location
Press Ok
Now do any formulation against that table
As said, I did some tests with the file opened in another instance and then refreshing the table, and it worked.
Let me know if yours do.
EDIT:
As per your comments, (though I didn't test it) I did some research on how to make this work with the default sharing links.
Here are the steps:
In Chrome:
Locate and select the source file in Onedrive (aka: https://onedrive.live.com/)
Click on Share and generate the view/edit link
Copy that link
As of this date, the link should look something like this:
https://1drv.ms/x/s!ArAKssDW3T7wnIIEvmhHrMxfvhowww?e=UsaATm
The key here is to replace the ms with ws, so the link that you need to use in Excel should be something like this:
https://1drv.ws/x/s!ArAKssDW3T7wnIIEvmhHrMxfvhowww?e=UsaATm
In Excel:
Click Data | Get Data | From other sources | From web (I don't have the english version right now, but you should be able to locate it)
Paste the URL
Click OK
Righ click the icon that says 1dr.ws
Select and click Excel
Continue with the other transformations

Copying data from a dropdown menu to a seperate sheet as a report using VBA

Complete beginner with VBA and I think I'm doing something majorly wrong.
So context;
Creating a user friendly sheet to do checks on items etc. To keep it as simple as possible for other people I've decided to use drop down menus to input the majority of the data and tick boxes to say when the check has been done.
From here I want to add a big old button that will transfer the data from the cells, dropdown menu and tick boxes to another sheet or workbook.
I would also need the sheet or workbook to place the date the checks were done and create a new line with the information. So that I can look at a single sheet and see the wear and tear on the equipment in one form. (layout of this can be sorted out after wards just how to get it to go to a blank line etc.)
And finally to save the document.
drop down information is linked from another sheet within the workbook.
Now I've tried some code to work it out myself and it either doesn't copy the data as the cell is blank (drop down menus) or it just shoots up an error on the VBA page.
Could anyone assist in helping me work this code out? Even if its just the command syntax's that I would need to use.
Thanks in advance
Peter

preventing Excel app from being emailed

I have employees that use a macro/external data enabled Excel file. One of the worksheets in this file contains proprietary data, that is populated from an external data source ODBC connection. This proprietary worksheet is always hidden from the user, because it just serves as a Vlookup-function data-source
I want to prevent my employees from accidentally emailing this Excel file, because I don’t want the hidden worksheet data to be available to non-employees
Please advise if there is anything I can do prevent the email recipient from being able to view the data that is in the hidden worksheet, if the app is accidentally emailed to them.
Are any of the following ideas feasible?:
Password protecting the hidden worksheet, yet, not preventing the Vlookup function from the other worksheet from functioning?
Imbedding something into the app that resembles a virus, to cause all email servers to block the attachment.
Creating a macro that deletes the data from the hidden worksheet when the app is closed
Imbedding large images into the app to make it too large to email, but yet won’t affect the performance.
Please advise, thank you very much in advance, Nathaniel
In regards to number 3, there is a setting like this in the Connection Properties. It's "Remove Data from the external data range before saving the workbook." I'm not looking at XL 2003, but it's nested under the "Refresh Data When Opening the File" option. As others have said, this isn't foolproof, but it might help meet your requirements.
I don't think you can fundamentally prevent your workbook to be sent around. Password-protecting the sheet would be of little help, as it is fairly easy to bypass. The safest approach to protect your proprietary data from prying eyes would be to not have it in the worksheet itself, retrieve it dynamically by prompting the user for some credentials, and never save it in a worksheet.
You can hide the sheet from the developer tab of excel. To do this, follow the steps below
Open the excel
Press Alt + F11
Here you can see the list of sheets on your excel file
Select the sheet that you want to hide
When you select the sheet you can see the properties of the particular sheet below
Set the visibility property to ‘2 – xlSheetVeryHidden’
Now right click on the sheet and select VBAProject – Project Properties
Navigate to the Protection tab and check ‘Lock project for viewing’
Set a password
Sheets hidden in this way cannot be un hidden unless one has access to the VBA Project (but this is now password protected). The sheet can be seen only if you know the password.

Resources