+ Reply to Thread
Results 1 to 7 of 7

make user form stay open while going to other pages but hide when i go to other sheet

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    CA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question make user form stay open while going to other pages but hide when i go to other sheet

    Hi,

    I have a user form for one sheet, and I want it to stay on the screen, but want it to leave when I go to other screens.
    How do I go about doing this?
    This is what I have so far and it just stays on the screen as I go from sheet to sheet.

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: make user form stay open while going to other pages but hide when i go to other sheet

    You should be able to use the Worksheet_Activate event, but you will have to put it in each worksheet (unless you want to get into classes, a bit harder). Something like:
    Please Login or Register  to view this content.
    on the worksheet where you want to show it, and
    Please Login or Register  to view this content.
    on the rest of the worksheets. This code would be pasted directly into each worksheet's module.
    Last edited by Leith Ross; 05-18-2012 at 07:36 PM. Reason: Added Code Tags

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: how to make user form stay open and still use other sheets

    You can use additional code in the worksheet event module to hide the userform when you deactivate the sheet, and when you activate the sheet again.
    When you hide the userform, the information should still be maintained on it, when you reactivate the sheet, the userform information will still be there.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: make user form stay open while going to other pages but hide when i go to other sheet

    I'm not a VBA guy but I would think you could use the Worksheet_Deactivate event.

  5. #5
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: how to make user form stay open and still use other sheets

    Dave's would be the better solution, it only requires code in the one worksheet.

  6. #6
    Forum Contributor
    Join Date
    04-06-2006
    Posts
    131

    Question Re: make user form stay open while going to other pages but hide when i go to other sheet

    I am having a similar issue to the above, but the above solution didn't work for me. When my form is open, it is stuck on top of all the other Excel windows. How do I get around that?

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: make user form stay open while going to other pages but hide when i go to other sheet

    Didi you place the worksheet_activate and deactivate code in the worksheet module?

+ 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