PC Review


Reply
Thread Tools Rate Thread

different password protect for different worksheets

 
 
Kanika
Guest
Posts: n/a
 
      6th Aug 2008
I need to give differenet passwords to different worksheets and publish this
on the web for all my users to do entries in this file,entries can be done
simultaneously or at different time.
I tried gogle spreadsheets but the programming part cannot be uploaded on
the google spreadsheets.

Thanx
kanika
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      9th Aug 2008
This is how I do it. Just right-click a sheet, name it password, and
copy/paste this code into the window that opens:
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
Select Case (i_pwd)

'#1
Case Is = "password1"
Worksheets("Sheet1").Visible = True
Worksheets("Sheet2").Visible = True
Worksheets("Sheet3").Visible = True


'#2
Case Is = "password2"
Worksheets("Sheet4").Visible = True
Worksheets("Sheet5").Visible = True
Worksheets("Sheet6").Visible = True


'#3
Case Is = "password3"
Worksheets("Sheet7").Visible = True
Worksheets("Sheet8").Visible = True
Worksheets("Sheet9").Visible = True


'#11
Case Is = "showall"
Call ShowSheets


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

Exit Sub


End Sub

Follow the logic. You should changes the text in quotes to match the sheets
that you want displayed, when the user clicks the Command Button to fire the
code. one more thing, since this is event code, linked to a private sub,
make sure you use the button from the 'Control Toolbox'; choose the
appropriate toolbar menu.


Regards,
Ryan---

--
RyGuy


"Kanika" wrote:

> I need to give differenet passwords to different worksheets and publish this
> on the web for all my users to do entries in this file,entries can be done
> simultaneously or at different time.
> I tried gogle spreadsheets but the programming part cannot be uploaded on
> the google spreadsheets.
>
> Thanx
> kanika

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password protect worksheets =?Utf-8?B?Sm9jaw==?= Microsoft Excel Programming 4 18th Sep 2007 02:32 PM
Can I password protect worksheets? =?Utf-8?B?bW9jaXR5?= Microsoft Excel Worksheet Functions 2 23rd May 2006 01:07 AM
password protect individual worksheets =?Utf-8?B?Tmljaw==?= Microsoft Excel Misc 3 28th Jun 2005 03:43 PM
Password Protect Worksheets =?Utf-8?B?VG9tIEhld2l0dA==?= Microsoft Excel Worksheet Functions 0 25th Feb 2005 12:57 PM
Password protect worksheets from being viewed within a workbook =?Utf-8?B?QnJpZ2dzLEM=?= Microsoft Excel Worksheet Functions 1 7th Sep 2004 01:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:02 PM.