Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default How do I write a macro that will allow users to set thier own pass

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I write a macro that will allow users to set thier own pass

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default How do I write a macro that will allow users to set thier own

How do I set up multible log ins and passwrods for this workbook?

"Gord Dibben" wrote:

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I write a macro that will allow users to set thier own

The question "why do you need multiple passwords to open the workbook?" comes to
mind if users are opening just the single workbook.

Back to the question "How do I set up multiple log ins and passwords for this
workbook?"

You could have them first open a dummy workbook with select case code to trap
their login name and ask for a password that matches that name.

If correct password entered, the workbook would open.

There may be another method depending upon why you want this.

Do you want to deny access to some users?

Do you want the workbook to open with just certain sheets visible depending upon
which user opens the workbook?


Gord

On Tue, 24 Jul 2007 09:54:02 -0700, David A.
wrote:
How do I set up multible log ins and passwrods for this workbook?


"Gord Dibben" wrote:

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default How do I write a macro that will allow users to set thier own

I managers that have teams. I use a workbook to track any errors that a
managers team memeber makes. I need to open just those that are assigned to
a particular manager. I don't want managers looking at other managers errors.
So if I set it up so that they creat a log in ( or I assign one) and
password it would accommplish my task.

"Gord Dibben" wrote:

The question "why do you need multiple passwords to open the workbook?" comes to
mind if users are opening just the single workbook.

Back to the question "How do I set up multiple log ins and passwords for this
workbook?"

You could have them first open a dummy workbook with select case code to trap
their login name and ask for a password that matches that name.

If correct password entered, the workbook would open.

There may be another method depending upon why you want this.

Do you want to deny access to some users?

Do you want the workbook to open with just certain sheets visible depending upon
which user opens the workbook?


Gord

On Tue, 24 Jul 2007 09:54:02 -0700, David A.
wrote:
How do I set up multible log ins and passwrods for this workbook?


"Gord Dibben" wrote:

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I write a macro that will allow users to set thier own

Note: the following is contingent upon users enabling macros.

If they don't only the "Dummy" sheet will be visible.

I assume you are on a network(LAN) with users logging into the system.

I would set it up so that whichever user's login name is flagged, all sheets
except that user would be hidden.

No password to open the workbook, just code to make a user's sheet visible.

In the Thisworkbook Module....................

Private Sub Workbook_Open()
Dim pword As String
Select Case Environ("Username")
'if a login is not used change to
'pword = InputBox("Enter Your Password")
'Select Case pword
Case Is = "Gord": Sheets("Gordsheet").Visible = True
Sheets("Dummy").Visible = False
Case Is = "Pete": Sheets("Petesheet").Visible = True
Sheets("Dummy").Visible = False
End Select
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim sht As Worksheet
Application.ScreenUpdating = False
Sheets("Dummy").Visible = xlSheetVisible
For Each sht In ActiveWorkbook.Sheets
If sht.Name < "Dummy" Then
sht.Visible = xlSheetVeryHidden
End If
Next sht
Application.ScreenUpdating = True
ThisWorkbook.Save
End Sub

To allow you to see all sheets and edit them.

In a general module...............

Sub UnHideAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Visible = True
Next n
Application.ScreenUpdating = True
End Sub

Naturally you want all this code inviisble to the users.

Right-click on the workbook/project in VBE and select VBAProject Properties and
"Lock project for viewing"

Enter a password.


Gord

On Tue, 24 Jul 2007 11:14:04 -0700, David A.
wrote:

I managers that have teams. I use a workbook to track any errors that a
managers team memeber makes. I need to open just those that are assigned to
a particular manager. I don't want managers looking at other managers errors.
So if I set it up so that they creat a log in ( or I assign one) and
password it would accommplish my task.

"Gord Dibben" wrote:

The question "why do you need multiple passwords to open the workbook?" comes to
mind if users are opening just the single workbook.

Back to the question "How do I set up multiple log ins and passwords for this
workbook?"

You could have them first open a dummy workbook with select case code to trap
their login name and ask for a password that matches that name.

If correct password entered, the workbook would open.

There may be another method depending upon why you want this.

Do you want to deny access to some users?

Do you want the workbook to open with just certain sheets visible depending upon
which user opens the workbook?


Gord

On Tue, 24 Jul 2007 09:54:02 -0700, David A.
wrote:
How do I set up multible log ins and passwrods for this workbook?


"Gord Dibben" wrote:

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default How do I write a macro that will allow users to set thier own

This is what I was trying to do....Thank you so much.....

"Gord Dibben" wrote:

Note: the following is contingent upon users enabling macros.

If they don't only the "Dummy" sheet will be visible.

I assume you are on a network(LAN) with users logging into the system.

I would set it up so that whichever user's login name is flagged, all sheets
except that user would be hidden.

No password to open the workbook, just code to make a user's sheet visible.

In the Thisworkbook Module....................

Private Sub Workbook_Open()
Dim pword As String
Select Case Environ("Username")
'if a login is not used change to
'pword = InputBox("Enter Your Password")
'Select Case pword
Case Is = "Gord": Sheets("Gordsheet").Visible = True
Sheets("Dummy").Visible = False
Case Is = "Pete": Sheets("Petesheet").Visible = True
Sheets("Dummy").Visible = False
End Select
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim sht As Worksheet
Application.ScreenUpdating = False
Sheets("Dummy").Visible = xlSheetVisible
For Each sht In ActiveWorkbook.Sheets
If sht.Name < "Dummy" Then
sht.Visible = xlSheetVeryHidden
End If
Next sht
Application.ScreenUpdating = True
ThisWorkbook.Save
End Sub

To allow you to see all sheets and edit them.

In a general module...............

Sub UnHideAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Visible = True
Next n
Application.ScreenUpdating = True
End Sub

Naturally you want all this code inviisble to the users.

Right-click on the workbook/project in VBE and select VBAProject Properties and
"Lock project for viewing"

Enter a password.


Gord

On Tue, 24 Jul 2007 11:14:04 -0700, David A.
wrote:

I managers that have teams. I use a workbook to track any errors that a
managers team memeber makes. I need to open just those that are assigned to
a particular manager. I don't want managers looking at other managers errors.
So if I set it up so that they creat a log in ( or I assign one) and
password it would accommplish my task.

"Gord Dibben" wrote:

The question "why do you need multiple passwords to open the workbook?" comes to
mind if users are opening just the single workbook.

Back to the question "How do I set up multiple log ins and passwords for this
workbook?"

You could have them first open a dummy workbook with select case code to trap
their login name and ask for a password that matches that name.

If correct password entered, the workbook would open.

There may be another method depending upon why you want this.

Do you want to deny access to some users?

Do you want the workbook to open with just certain sheets visible depending upon
which user opens the workbook?


Gord

On Tue, 24 Jul 2007 09:54:02 -0700, David A.
wrote:
How do I set up multible log ins and passwrods for this workbook?


"Gord Dibben" wrote:

No such thing as a Master password that overrides individual passwords

Keep a list of the users' passwords handy so's you can assist when they forget.


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 09:02:01 -0700, David A.
wrote:

I need to let the user chose thier own password. Of course I will need a
master password for my self to reset anyone that forgets theirs. Is there a
way to do this?






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
Macro works for some users and not others kfell Excel Discussion (Misc queries) 6 April 17th 07 02:41 PM
Path and Number of files in a folder. - Pass to Macro. Richard Excel Discussion (Misc queries) 1 December 21st 06 09:20 PM
how do i write a macro AB Excel Worksheet Functions 1 August 17th 06 08:47 PM
macro works for some users and doesn't for others Pooja Excel Discussion (Misc queries) 2 October 27th 05 08:27 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM


All times are GMT +1. The time now is 01:14 AM.

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

About Us

"It's about Microsoft Excel"