+ Reply to Thread
Results 1 to 3 of 3

Code to avoid duplicate userforms

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Code to avoid duplicate userforms

    Hi,

    I have a userform that has a control button that opens another userform that contains a listbox with a range of data. I want to click on an item and press a control button to add it to a textbox on my first userform. I do this via:

    Please Login or Register  to view this content.
    This works fine, but I need the same method for 5 seperate Multipages. Instead of creating 5 duplicate forms, is there a way of replacing tadnasname.Value with say the active textbox so I can just use one form?

    Thank you in advance.
    Last edited by jpruffle; 07-12-2009 at 08:30 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Code to avoid duplicate userforms

    Personally I would work it the other way.

    Rather than push the value from the userform to varying textboxes I would pull the value from the first userform.

    Code in first userform
    Please Login or Register  to view this content.
    Code in second form
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Code to avoid duplicate userforms

    Thank you, that is far more logical.

    Still learning...

+ 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