+ Reply to Thread
Results 1 to 7 of 7

Show sheet when userform is shown hide Sheet when userform is closed

  1. #1
    Registered User
    Join Date
    10-20-2014
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    41

    Show sheet when userform is shown hide Sheet when userform is closed

    I am trying to show sheet3 (named MCR (BLANK)) when ever the Userform1 is initialized and Hide the sheet when Userform1 is terminated.

    Tried the code below, but it did nothing, any help or direction would be greatly appreciated.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by CtrlAltDelete; 11-25-2014 at 04:08 PM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,101

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    Hello CtrlAltDelete,

    I do not have Excel 2010, but please try the Workbook now. Instead of using the Userform Terminate Event, I have opted to disable the Close "X" Box on the Userform so that users are compelled to exit via the "Close" Button at the Bottom of the Userform.

    Hope that helps.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    3,979

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    Hi there,

    Try modifying your code as indicated below:

    Please Login or Register  to view this content.
    Rather than deleting the lines you don't need, I've "commented them out" to make the changes a bit easier to see.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

    P.S. Oops - got it the wrong way round! Just swap the "True" and "False" values for the Visible property to make it work the way you want it to
    Last edited by Greg M; 11-25-2014 at 03:22 PM. Reason: P.S. added

  4. #4
    Registered User
    Join Date
    10-20-2014
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    41

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    @Winon I was unable to get the document to work properly, after downloading it i opened up the userform and clicked closed and the sheet did not hide, however the ability to not click the X is a great little code Thank you.

  5. #5
    Registered User
    Join Date
    10-20-2014
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    41

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    @ Greg M. Thank you that worked great. the code needed to be put in both the add item in the worksheet and the close button in the userform, thank you again! Posting the fixed sheet for anyone else having this issue in the future.
    Attached Files Attached Files
    Last edited by CtrlAltDelete; 11-25-2014 at 04:09 PM.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,101

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    Hello CtrlAltDelete,

    Thank you for the feedback. Yeah, it is hard to predict the interactions between different MS Office versions, whilst it runs perfectly on my side, same may not hold true with your set-up, it can turn out funny quirks. Glad I could help somewhat with the limited sesources at my disposal, and thank you for the "Rep" Tap.

    'Till Later.

    Appreciate that.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    3,979

    Re: Show sheet when userform is shown hide Sheet when userform is closed

    Hi again,

    Many thanks for your very prompt feedback and also for the reputation increase

    Delighted that I was able to help.

    Best regards,

    Greg M

+ 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. [SOLVED] Show UserForm InkPicture in Sheet
    By nickwoowoo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2017, 02:28 AM
  2. [SOLVED] Show UserForm when switch to a sheet Solved by : ?
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2014, 06:27 AM
  3. [SOLVED] Show results from a sheet in a userform
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2014, 12:25 PM
  4. [SOLVED] VBA Help - List show in userform's combo box from sheet
    By sa.1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2012, 08:33 AM
  5. UserForm to search sheet, show results on separate userform?
    By egemenkepekci in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2010, 01:06 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