+ Reply to Thread
Results 1 to 6 of 6

userform duplicating add data

  1. #1
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204

    userform duplicating add data

    Guy's

    Attached is a data entry form i've been working on as a project to help me learn VBA. I'm having a problem with it. I've got it to add the data from the userfrom (textboxes and comboboxes) to the next empty row on the worksheet. for some reason it's duplicating data that should be going into column a into column h. i thought it was because the cell in h has nothing in it but i've tried changing that by entering data. still nothing.

    Can you have a look and see what my problem is.

    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Jsmity,

    I downloaded your workbook. Once I have input data to the form, should I press "ADD" in order to see the problem?

    Sincerely,
    Leith Ross

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    In your CommandButton1_Click macro you have these 2 commands

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204
    so if i remove then offset that should do it ?

    Also how do i make all the data on the sspreadsheet default to uppercase ?

  5. #5
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204
    I downloaded your workbook. Once I have input data to the form, should I press "ADD" in order to see the problem?

    Sincerely,
    Leith Ross

    Yes if you press ADD then "close the input form" you will see on the worksheet that it has added the data from combox2 to A and H but i only want it in A

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    If column H is to be blank then remove
    Please Login or Register  to view this content.
    else change the ComboBox2 to something else


    to have it all uppercase you will need to add Ucase to each command

    Please Login or Register  to view this content.
    a easier way to write your codt to clear the form is

    Please Login or Register  to view this content.
    You could also replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    Last edited by mudraker; 09-15-2007 at 07:43 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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