+ Reply to Thread
Results 1 to 5 of 5

Add data from a userform to a specific row

Hybrid View

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Add data from a userform to a specific row

    I am new to using VBA, and this is the first userform I have ever made. I'm trying to build a database of a lot of data for a clinical research trial.

    I have been able to get the userform to add the data to the worksheet. However, the issue I came across is that I cannot fit every entry field onto one userform, so I had to split it into two forms. I added an entry field in the second form to identify the patients as well, so I would be able to match the data from the two forms, but I do not know how to get the data from this form to be added to the same row as the data from the first form. So I guess my question is, is there a way to have the userform add the data into a specific row (ie, a row that already contains a specific entry in a specific cell?)

    While I was trying to find an answer to this problem, I came up with an alternative. I was thinking that I could have the two userforms add their data into two separate worksheets, then program a macro to copy this data into one master worksheet. would this be easier? if so, how would i go about doing this?

    I really appreciate any help you all can give me!
    Last edited by blindzero678; 07-08-2010 at 08:40 PM. Reason: solved

  2. #2
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Add data from a userform to a specific row

    I can definitely see how that would work. Would using the MultiPage object affect how I write the code for the objects on the form?

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

    Re: Add data from a userform to a specific row

    Hello blindzero678,

    The effects will be minimal. Check your VBA help files for more information and examples.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Add data from a userform to a specific row

    Okay, thank you!!

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

    Re: Add data from a userform to a specific row

    Hello blindzero678,

    Instead of creating multiple UserForms, add a MultiPage object to your UserForm. The control has pages that can hold controls just like the UserForm. Each tab can be used to group like information together an make it easier for the user to find and edit the data. The MultiPage is part of the standard Controls for a UserForm.

+ 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