Announcement

Collapse
No announcement yet.

Excel VBA: Creating a Login Box

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Excel VBA: Creating a Login Box

    Hi,

    I was wondering if anybody could help me with making a login box (some tips on the script). I don't know much about VBA etc. So please bare with me. I want it so that when the workbook opens it prompts for a username and password. You can also have a button for "register" etc. Which will send you to a website. If this is possible please help.

    Thanks in advance!
    Hel.

  • #2
    Re: Excel VBA: Creating a Login Box

    The redirect to a website can be accomplished through a hyperlink

    Why go through the hassle of a login box? Why not use the built in password protection of excel?
    Tony

    Comment


    • #3
      Re: Excel VBA: Creating a Login Box

      This should work for you.

      All passwords are currently "password"

      Post back if you need help.
      Attached Files
      Tony

      Comment


      • #4
        Re: Excel VBA: Creating a Login Box

        n1 m8, you helped loads.

        I will add you into my coursework bibliography and I hope you know that you just saved my life :P Literally >_< the ICT teacher was on my neck - ^_^ thanks again m8.

        Hizo.

        Ps - Hey m8, I was reviewing the code you used and I stumbled across something I didn't understand:
        Code:
        If password = WorksheetFunction.VLookup(UserList.Value, Range("Users_List"), 2, 0)
        Ok Fair enough, you call the function vertical looktup but what are the "arguments"?

        I don't undestand (for some reason - probably missing something very obvious) what the "UserList.Value" part is refering to.

        Is it a cell reference? O.o

        Thanks in advance!
        Hizo

        pps - DOH lol i just got it, its refering to the username input box in Form1 isn't it? lol

        Ok, now Im confused again ;/ how does the list display? >_< lol sorry about this, I've tried reading one of those books, but I learn quicker through trial adn error :D

        ^^ thnks in advance again lolz
        Hizo
        Last edited by royUK; April 21st, 2005, 15:53. Reason: add code tags, please use when posting codes

        Comment


        • #5
          Re: Excel VBA: Creating a Login Box

          The list uses a named range from the "Protected" Sheet. Sorry I didn't document better but I was in the middle of something else and didn't have the extra time.
          Tony

          Comment


          • #6
            Re: Excel VBA: Creating a Login Box

            Hey nps :D!

            This is wicked as it is ^_^.

            I thought that when you rename a range, it changes, the name, but when in your document, it keeps its own name o.O lol Did that make sence?

            Hizo.

            Comment


            • #7
              Re: Excel VBA: Creating a Login Box

              Hizo,

              I am having a hard time following your posts. I don't keep up with the short hand of internet communication very much.

              The named range is actually a dynamic named range so it will grow/contract with additions/removal of items. You can only change the name by deleting and recreating. Under Insert > Name > Define.
              Tony

              Comment


              • #8
                Re: Excel VBA: Creating a Login Box

                I'm sorry mate. I'll speak more plainly :s its my messenger accent lol, its almost reflexive >_<.

                Thanks, I think you got what I meant though. I mean the code's perfect - thanks man

                Also in order to learn the code myself (and not simply leach off you) I was trying to implement it into my coursework :P leading to a very messed up work book. Lol, I didn't see where the Users_List was comming from. But now I do and you've solved my problem ^_^.

                Thanks!
                Hiz.

                Comment


                • #9
                  Re: Excel VBA: Creating a Login Box

                  Hi there,

                  i have read your code about Excel VBA: Creating a Login Box and try to use it. but i have problem to update the password. after input new password and then click update password, pasword updated.
                  but appear msg box : must use this form...... then file closed and password not updated.
                  yesterday this code running well.
                  can you help me to solve this problem ?

                  Comment


                  • #10
                    Re: Excel VBA: Creating a Login Box

                    sekrup

                    I suggest that you read the Forum Rules that you agreed to.

                    Don't hijack other's posts with your questions, start your own, add a link to this one if it will help
                    Hope that Helps

                    Roy

                    New users should read the Forum Rules before posting

                    For free Excel tools & articles visit my web site

                    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

                    RoyUK's Web Site

                    royUK's Database Form

                    Where to paste code from the Forum

                    About me.

                    Comment


                    • #11
                      Re: Excel VBA: Creating a Login Box

                      sorry, i've re-read it...

                      Comment

                      Working...
                      X