Consulting

Results 1 to 16 of 16

Thread: Solved: Login Screen / Password Call & Validation Issue

  1. #1
    VBAX Regular
    Joined
    Jul 2009
    Posts
    7
    Location

    Wink Solved: Login Screen / Password Call & Validation Issue

    I have a really awesome log where users open it up, and can input call data to track all our Supervisor Calls to the call center I work in.

    I've enhanced the spreadsheet quite a bit, but have a need to protect from just anyone going into the form. Other associates are accessing the form and deleting what has logged. So I want to restrict the access to only a certain number of users.

    I've created the login page, and another page with the user IDs and passwords, but now here's where I'm stuck.

    What's the best way to have excel / VBA search and compare against that worksheet of User IDs and Passwords for each of the text boxes...and then if they match, do an unload of the form, and load of the input form.

    And then if it returns as FALSE, basically someone just trying to log in that shouldn't be in...it loads the failed screen for example.

    It might sound like an easy concept, but I've just come up on a roadblock on this one. Thanks for your help in advance.

    The form is a little too large to post here, but if you want to see it, I can e-mail it to you, just hit me back.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Welcome to VBAX
    Have a look at this thread
    Enter name "admin" password is "1"
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi Acer,

    Perhaps post at a free site?

    ie: http://www.4shared.com/
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  4. #4
    VBAX Regular
    Joined
    Jul 2009
    Posts
    7
    Location

    Cool Posted the OFS Log

    Thanks rbrhodes!

    I've uploaded the file to the following link for review.

    4shared.com/file/116226010/679c1d01/OFS_Log_V77.html

  5. #5
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Posted file
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  6. #6
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi acer,

    Had way too much fun with this one! Read the code and the comments...


    http://www.4shared.com/file/11626732..._Log_V771.html

    PS: There is a button behind the "Login" image on the Welcome form to allow for tabbing from textboxes to Login.

    Usernames and passwords and security are as follows:

    78209, honors01, 1
    667, neighbour, 2
    649, noUsedcar, 2
    42, theAnswer, 3

    All case sensitive at this time although the code is there for you to change that, Also the passwords are masked with * and that is in the textbox properties (passwordChr).

    ...have fun...
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  7. #7
    An example of a login form. There will still need to be changes to suit your needs and usernames passwords ECT. This example is basically to demostrate caplock display feature and the x "close"

    Had a quick peek at one of the file "OFS LOG examples here and that looks like there is a fair bit going on there

    D_Rennie

  8. #8
    VBAX Regular
    Joined
    Jul 2009
    Posts
    7
    Location

    SOLVED: Thank you!

    rbrhodes -- thank you so much! The form is awesome and works like a charm!

    Glad you had fun, the entire thing was a project that my job let me work on to develop, so it was awesome to be able to work on something I enjoy doing rather than what they want me doing, LOL

    Thank you so much again...

  9. #9
    How many hidden little jems are withen this Workbook. "FormWelcome" "Label4"

  10. #10
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi,

    I was tempted to put in "Easter eggs", for sure. I think 2...or 3 made it.
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  11. #11
    You have done great work.
    Ill sit down and take a close look at what is going on in it. "ill try to find the other ester eggs"
    its verry clean and im sure ill learn a lot from you approach.

    D_Rennie.

  12. #12
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by rbrhodes
    Hi acer,

    Had way too much fun with this one! Read the code and the comments...


    http://www.4shared.com/file/11626732..._Log_V771.html

    PS: There is a button behind the "Login" image on the Welcome form to allow for tabbing from textboxes to Login.

    Usernames and passwords and security are as follows:

    78209, honors01, 1
    667, neighbour, 2
    649, noUsedcar, 2
    42, theAnswer, 3

    All case sensitive at this time although the code is there for you to change that, Also the passwords are masked with * and that is in the textbox properties (passwordChr).

    ...have fun...
    I got a debug error on selecting the Data worksheet
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  13. #13
    I noticed that aswell.
    Not sure what the final object for the user_level layout would be i didnt say nothink.
    Though from what i can see the error deals with the Security level of the user. And that sheet being xlveryhidden. "This Workbook"
    And user/password. "module FormCode"
    [vba] Select Case Level
    Case Is = 1
    'Just me
    Sheets("Input").Visible = True

    Case Is = 2
    For Each sht In Worksheets
    'All except 'Login' (Passwords)
    If sht.Name <> "Login" Then
    sht.Visible = True
    End If
    Next sht
    Case Is = 3
    For Each sht In Worksheets
    'All
    sht.Visible = True
    Next sht
    End Select[/vba]
    D_Rennie

  14. #14
    I also got another error Withen "FormInput" With [VBA]Private Sub ComboTopic_AfterUpdate()

    With Sheets("Lists")
    If IsNull(ComboTopic.Value) = False Then ComboSubtopic.Visible = True
    If ComboTopic.Value = .Range("a1") Then
    For counter = 2 To 60
    Set curCell = .Cells(counter, 1)
    ComboSubtopic.AddItem curCell.Value
    Next counter
    End If

    If ComboTopic.Value = .Range("b1") Then
    For Counter1 = 2 To 60
    Set curCell = .Cells(Counter1, 2)
    ComboSubtopic.AddItem curCell.Value
    Next Counter1
    End If

    If ComboTopic.Value = .Range("c1") Then
    For Counter2 = 2 To 60
    Set curCell = .Cells(Counter2, 3)
    ComboSubtopic.AddItem curCell.Value
    Next Counter2
    End If

    If ComboTopic.Value = .Range("d1") Then
    For Counter3 = 2 To 60
    Set curCell = .Cells(Counter3, 4)
    ComboSubtopic.AddItem curCell.Value
    Next Counter3
    End If
    End Sub[/VBA]

    The Error seams to be solved using [VBA]Private Sub ComboTopic_AfterUpdate()
    Dim counter
    Dim curCell
    Dim Counter1
    Dim Counter2
    Dim Counter3

    With Sheets("Lists")
    If IsNull(ComboTopic.Value) = False Then ComboSubtopic.Visible = True
    If ComboTopic.Value = .Range("a1") Then
    For counter = 2 To 60
    Set curCell = .Cells(counter, 1)
    ComboSubtopic.AddItem curCell.Value
    Next counter
    End If

    If ComboTopic.Value = .Range("b1") Then
    For Counter1 = 2 To 60
    Set curCell = .Cells(Counter1, 2)
    ComboSubtopic.AddItem curCell.Value
    Next Counter1
    End If

    If ComboTopic.Value = .Range("c1") Then
    For Counter2 = 2 To 60
    Set curCell = .Cells(Counter2, 3)
    ComboSubtopic.AddItem curCell.Value
    Next Counter2
    End If

    If ComboTopic.Value = .Range("d1") Then
    For Counter3 = 2 To 60
    Set curCell = .Cells(Counter3, 4)
    ComboSubtopic.AddItem curCell.Value
    Next Counter3
    End If
    End With
    End Sub[/VBA]

    Cheers
    D_Rennie

  15. #15
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi,

    Seems like a new thread to me but "wothtehell, archy". The original post was how to set up passwords...

    As for the errors:

    The Form error is indeed the lack of variable declaration ( I always use Opton Explicit). The Data form error was because Sheets are being actvated to run code. I changed both of those in this version.

    Perhaps the Level one user needs at least the data form visible for viewing Perhaps protected from changes? But that's really up to the OP so I didn't change that...

    Thanks for the debug guys!

    Revised WB at:

    http://www.4shared.com/file/11660132..._Log_V772.html
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  16. #16
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    As threads can be meaningless without samples, can you please post files within VBAX?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •