?
Solved

Protect Hidden Sheet in Excel

Posted on 2014-04-25
3
Medium Priority
?
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Steve earned 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
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.

765 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