Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default safeguarding document

How can I make a document disappear and reopen in EXEL only after using a
password?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default safeguarding document

Save it with a password to open.

To make it diasappear, close it.

Then re-open it using the password to open.


Gord Dibben MS Excel MVP

On Thu, 1 Oct 2009 01:19:02 -0700, dieter
wrote:

How can I make a document disappear and reopen in EXEL only after using a
password?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default safeguarding document

You may want to look at this too:
http://www.databasedev.co.uk/access_security.html


HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Gord Dibben" wrote:

Save it with a password to open.

To make it diasappear, close it.

Then re-open it using the password to open.


Gord Dibben MS Excel MVP

On Thu, 1 Oct 2009 01:19:02 -0700, dieter
wrote:

How can I make a document disappear and reopen in EXEL only after using a
password?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default safeguarding document

That was supposed to be for another post! How did that get in there!!!
Anyway.....

Put the code below behind the sheet (right-click tab and click 'view code')

Private Sub CommandButton1_Click()

Dim i_pwd As String

i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...")
If i_pwd = "" Then
Exit Sub
End If

'#1
Select Case LCase(i_pwd)
Case Is = "#1"
Worksheets("#1").Visible = True
Sheets("#1").Select

'#2
Case Is = "#2"
Worksheets("#2").Visible = True
Sheets("#2").Select

'#3
Case Is = "#3"
Worksheets("#3").Visible = True
Sheets("#3").Select

'#4
Case Is = "#4"
Worksheets("#4").Visible = True
Sheets("#4").Select

Case Else
MsgBox "Incorrect password; no action taken.", vbInformation, _
"Unhide Sheet..."
End Select

Exit Sub


End Sub


Put this code in the 'ThisWorkbook' file:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call HideSheets
End Sub

Private Sub Workbook_Open()
Worksheets("AllEmployees").Activate
Application.GoTo Range("A1"), Scroll:=True

End Sub

Obviously, you have to change the code to match your sheet names.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ryguy7272" wrote:

You may want to look at this too:
http://www.databasedev.co.uk/access_security.html


HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Gord Dibben" wrote:

Save it with a password to open.

To make it diasappear, close it.

Then re-open it using the password to open.


Gord Dibben MS Excel MVP

On Thu, 1 Oct 2009 01:19:02 -0700, dieter
wrote:

How can I make a document disappear and reopen in EXEL only after using a
password?



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
change excel document into word document mrsb Excel Discussion (Misc queries) 6 August 28th 07 12:58 PM
convert excel document to word document (not a picture) frendabrenda1 Excel Discussion (Misc queries) 2 October 6th 06 03:55 PM
How to create a formatted 'readable' document based on Excel document? [email protected] Excel Discussion (Misc queries) 0 June 23rd 06 06:09 PM
how do i rotate a document or print small document on envelope crystal New Users to Excel 2 March 23rd 06 03:52 PM
How to change a excel document into a word document? wannaknow Excel Discussion (Misc queries) 1 July 27th 05 09:37 PM


All times are GMT +1. The time now is 02:48 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"