Solved

Protect Hidden Sheet in Excel

Posted on 2014-04-25
3
380 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now