+ Reply to Thread
Results 1 to 3 of 3

Hide Command Button & Rows

  1. #1
    Registered User
    Join Date
    12-30-2007
    Posts
    1

    Post Hide Command Button & Rows

    Help please. I have a command button on sheet1. When pressed it has to unhide rows and command buttons on sheet2. Likewise the reverse also has to happen. At the moment, when I hide the rows, the command buttons move down to the nearest visible row. If saved here as the defauls position, they don't return to the correct position when the rows are made visible.

    Please help.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    When you right click on the button and Format the control. The Properties tab has various options of moving and/or sizing the button with cells. I like to have my controls do neither.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    To hide the button when the rows are hidden, add
    Please Login or Register  to view this content.
    to the hide rows routine.

    To unhide the button when the rows are unhidden is different. Unhiding rows will trigger a Calculate event if there is a formula on the sheet that refers to both hidden and unhidden cells. That's the only way I know to trigger an "UnHide" event.
    This event code will unhide CommandButton 1 when Row 2 is unhidden. Some modification of it should work for you.

    Please Login or Register  to view this content.

+ 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