Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


excel - record ID / Password

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> Option Pricing Models
View previous topic :: View next topic  
Author Message
sjvenz



Joined: 13 Mar 2005
Posts: 2

PostPosted: Sun Mar 13, 2005 6:56 am    Post subject: excel - record ID / Password Reply with quote

OK I have set up a workbook which has one administrator and three users that are logged in at the on time.

When the workbook opens (without going through all the code a FORM opens for the user to enter in a password and the following code applies.

What happens during the course of the shift is that the sdministrator will update/change the worksheets and the issue an update to the users who will then click UPDATE FILE to get the updates.

Then they are required to re-enter thier passwords once again to get the updates, this may happen a number of times during the course of the shift.

What I would like to know, is there a way so that when an updated is issued the user doesn't have to re-enter the password.


Me.Caption = " Hello : " & Application.UserName


If txtPassword.Text = "" Then
Unload frmPassWord
MsgBox (" Welcome ")
Worksheets("NLD " & UCase(Format$(Now(), "ddd"))).Activate

Call protect

ElseIf txtPassword.Text = "NLD" Then
Unload frmPassWord
MsgBox (" Welcome Newlands Controller ")

Call protect

Worksheets("NLD " & UCase(Format$(Now(), "ddd"))).Activate

ElseIf txtPassword.Text = "NW" Then
Unload frmPassWord
MsgBox (" Welcome Near West Controller ")

Call protect

Worksheets("NW & FW " & UCase(Format$(Now(), "ddd"))).Activate
' Worksheets("NW " & UCase(Format$(Now(), "ddd"))).Activate


ElseIf txtPassword.Text = "FW" Then
Unload frmPassWord
MsgBox (" Welcome Far West Controller ")

Call protect

Worksheets("NW & FW " & UCase(Format$(Now(), "ddd"))).Activate
' Worksheets("NW " & UCase(Format$(Now(), "ddd"))).Activate

ElseIf txtPassword.Text = "gail" Then
Unload frmPassWord
MsgBox (" Welcome ")


Call protect

frmMenu.Show 0
frmNetSend.Frame5.Visible = False
frmNetSend.MultiPage2.Visible = False
frmNetSend.MultiPage4.Visible = False

Worksheets("NW & FW " & UCase(Format$(Now(), "ddd"))).Activate
' Worksheets("NW " & UCase(Format$(Now(), "ddd"))).Activate

ElseIf txtPassword.Text = "virus" Then
Unload frmPassWord
MsgBox (" Welcome Administrator ")

Call UnProtect
frmMenu.Show 0

frmNetSend.Frame5.Visible = True
frmNetSend.MultiPage2.Visible = True
frmNetSend.MultiPage4.Visible = True

Worksheets("NW & FW " & UCase(Format$(Now(), "ddd"))).Activate
' Worksheets("NW " & UCase(Format$(Now(), "ddd"))).Activate

Else
MsgBox ("Sorry, you are not an ADMINISTRATOR.")
Unload frmPassWord

Call protect

End If

TextBox1.Visible = False
txtPassword.Visible = False
cmdPassword.Visible = False

Unload Me
Back to top
View user's profile Send private message
Data
Moderator
Moderator


Joined: 06 Oct 2004
Posts: 33
Location: NY

PostPosted: Tue Mar 15, 2005 5:23 pm    Post subject: Reply with quote

You can put a boolean variable to act as a flag, when the user enter the password and granted the access, the flag will be true. This value is saved in the memory. As long as the flag value is true, the password request box will not appeared.
_________________
Data
Knowledge is Power
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> Option Pricing Models All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group