Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Secure sheets



Hi,

How can I see on my sheets if a sheet is protected or not with a
formula?


Thanks,
Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Secure sheets

I don't think excel has anything you could use built in.

But you could create your own userdefined function:

Option Explicit
Function IsSheetProtected(Optional rng As Range) As Boolean

Application.Volatile True

If rng Is Nothing Then
Set rng = Application.Caller
End If

With rng.Parent
IsSheetProtected = (.ProtectContents _
Or .ProtectDrawingObjects _
Or .ProtectScenarios)
End With
End Function

But don't trust this until you recalculate. Changing the protection won't make
this function reevaluate.

In a cell:
=issheetprotected(Sheet1!A1)
or
=issheetprotected(A1)
or even
=issheetprotected()

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Pierre wrote:

Hi,

How can I see on my sheets if a sheet is protected or not with a
formula?

Thanks,
Pierre


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - how to se Secure FTP Ve.Bala Excel Discussion (Misc queries) 1 July 25th 09 09:56 PM
Secure Information Michael Link Excel Discussion (Misc queries) 0 March 7th 06 04:03 PM
Secure Workbook SuperJas Excel Programming 2 December 15th 03 05:18 AM
secure your worsheet using vba solo_razor[_34_] Excel Programming 1 November 17th 03 02:03 PM
secure a sheet solo_razor[_25_] Excel Programming 1 November 4th 03 01:21 PM


All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"