Solved

Protect Hidden Sheet in Excel

Posted on 2014-04-25
3
387 Views
Last Modified: 2014-04-25
I have a worksheet that pulls data (using external data) from a SQL database.  In the same worksheet I have a sheet that pull data from a Access database.  The SQL sheet has confidential info on it that I want to be able to hide the data or sheet from anyone being able to see it.  On the Access sheet I have a Vlookup that is pull info from the sheet I want hidden, but when I hide and protect it won't let me refresh all because it say the data is Read Only.  Is there anyway to get the results I want.
Thanks
0
Comment
Question by:nursecore
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Steve earned 500 total points
ID: 40023653
You may have to make a Unprotect, unhide, refresh, protect, hide routine instead of just the refresh.

Sub GetRefresh()

Worksheets("Sheet1").Unprotect Password:="pswd"
Worksheets("Sheet1").Visible = xlSheetVisible

'**Refresh code goes here

Worksheets("Sheet1").Protect Password:="pswd"
Worksheets("Sheet1").Visible = xlSheetVeryHidden

End Sub

Open in new window

0
 

Author Closing Comment

by:nursecore
ID: 40023797
Used VBA and chose the VeryHidden option for that page and it did what I needed.  No one else uses VBA so they shouldn't be able to unhide themselves.  I never new that existed.  Learn something new everyday.  
Thanks
0
 
LVL 7

Expert Comment

by:Steve
ID: 40023851
You can also protect the "project" with a password keeping them out of the code as well.

From the tools menu in the editor,
go to VBAProject Properties, select the Protection tab, select "Lock project for viewing", then enter & confirm your password in the fields provided, and click OK.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This collection of functions covers all the normal rounding methods of just about any numeric value.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question