+ Reply to Thread
Results 1 to 7 of 7

Thread: fill a listbox from textbox of other tab of userform in excel vba

  1. #1
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    fill a listbox from textbox of other tab of userform in excel vba

    Hello,
    I have a textboxin one tab of userform and a listbox in other tab.
    I want that whatever text is written in text box is stored in the listbox of other tab.
    Any help will be appreciated

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: fill a listbox from textbox of other tab of userform in excel vba

    Something like
    Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    With Me
    .ListBox1.AddItem .TextBox1
    .TextBox1.Value = Empty
    End With
    End Sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: fill a listbox from textbox of other tab of userform in excel vba

    Thankyou, Roy for reply.
    I am extremely sorry for I provided some wrong information. Actually I just modified the userforms a bit.
    Now,there are two userforms. The userform containing the textbox is launched from another userform and the launching userform has a combobox(not listbox) in other tab.
    Now, how to populate this combobox with the textbox entries.
    Hope,you will help me out

  4. #4
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: fill a listbox from textbox of other tab of userform in excel vba

    You are making work for yourself. One userform with a Multipage is the best way to do this
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  5. #5
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: fill a listbox from textbox of other tab of userform in excel vba

    I kow roy but the situation demands so.
    Please help me out.

  6. #6
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: fill a listbox from textbox of other tab of userform in excel vba

    Well I am stuck due to the above mentioned problem.
    Any help will be greatly appreciated.

  7. #7
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: fill a listbox from textbox of other tab of userform in excel vba

    I can't see any situation that would demand two userforms. You need to attach an example workbook
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ 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.2.0