+ Reply to Thread
Results 1 to 13 of 13

Userform with Multi-Tabs and Textboxes losing values when switching tabs

  1. #1
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Userform with Multi-Tabs and Textboxes losing values when switching tabs

    I have a Userform with multi-tabs. If I enter a value into a textbox on tab 1, switch to tab 2 and then go back to tab 1 the textbox is clear.

    How can I can get the textboxes to hold their data when switching back and forth?

  2. #2
    Forum Contributor
    Join Date
    04-04-2014
    Location
    Tetbury, England
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    Hi guitarsweety

    I've just tested this and it's not happening to me, please could you upload your file

  3. #3
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    No problem, the Userform is Firstplant
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    04-04-2014
    Location
    Tetbury, England
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    Where exactly is the data not being saved when you switch tabs?

  5. #5
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    If I select Yes on Level 1, go to Level 2 and then back to Level 1. The textbox is clear. It's not holding the Yes value.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    In the Tabstrip_change event you have:
    Please Login or Register  to view this content.
    which resets the value.
    Remember what the dormouse said
    Feed your head

  7. #7
    Forum Contributor
    Join Date
    04-04-2014
    Location
    Tetbury, England
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    Rory has it, remember you have this code 5 times.

  8. #8
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    Any suggestions on how to fix this?

  9. #9
    Forum Contributor
    Join Date
    04-04-2014
    Location
    Tetbury, England
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    If you want the Yes/No to show on the sheet "ProcessHazardMgmt", use this:

    Please Login or Register  to view this content.
    And maybe in the UserForm_Initialize, which will show in the textbox what was selected before:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    I'm tried that but now i'm getting an Object required error

  11. #11
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    11
    Posts
    2

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    get a list of multiple tabs in a worksheet

  12. #12
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    11
    Posts
    2

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    I have a wkst with 40 tabs; how do I get a list of them?

  13. #13
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Userform with Multi-Tabs and Textboxes losing values when switching tabs

    @DanielaLascu,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 07-23-2014, 06:15 AM
  2. Copying values from multiple Tabs of a WB into corresponding Tabs of another WB using VBA
    By sanc.jobs2012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2012, 06:15 AM
  3. switching between tabs
    By s.walsh87 in forum Excel General
    Replies: 2
    Last Post: 03-08-2011, 10:27 AM
  4. Switching between tabs
    By ml20080424 in forum Excel General
    Replies: 1
    Last Post: 06-22-2008, 08:54 PM
  5. Capture worksheet switching inside userform and update textboxes to new sheet
    By RockiesMan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2007, 05:10 PM

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