+ Reply to Thread
Results 1 to 3 of 3

Entering UserForm Data Into a Worksheet

  1. #1
    Registered User
    Join Date
    04-29-2012
    Location
    Juperos Elevator
    MS-Off Ver
    Excel 2007
    Posts
    10

    Entering UserForm Data Into a Worksheet

    Hello! I need a little help in making an account database.
    I made a worksheet wherein the user inputs information such as username, password and id number through text boxes. The worksheet wherein I want the data to appear in is named "Usernames and Passwords". I have a command button (something like submit) and here is my code for it:
    Please Login or Register  to view this content.
    My problem is that when I enter another set of information, it replaces the one before it, so I'm stuck with just a single row of information. Thank you very much!
    Last edited by dizzygirl; 05-21-2012 at 04:30 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,436

    Re: Entering UserForm Data Into a Worksheet

    To comply with forum rules, you should add code tags to your code excerpt.

    However, while you do that and, to save you some time, move the "Dim ctr As Long" above the "Private Sub CommandButton1_Click()"

    What's happening is the variable is defined within the module and created afresh every time the button is clicked ... hence you get row 2 every time.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Entering UserForm Data Into a Worksheet

    Hi

    Upload the file....
    Click *, if my suggestion helps you. Have a good day!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1