+ Reply to Thread
Results 1 to 5 of 5

Macro code that hides or unhides rows in other worksheets

  1. #1
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Macro code that hides or unhides rows in other worksheets

    Hello!

    What Maco code would hide/unhide rows in other worksheets? I basically want to assign this code to a button.
    I need it to affect multiple worksheets, so I need to be able to change the code and specify:
    1. Which worksheets it affects (For example, (Sheet1, Sheet2, etc)) multiple worksheets at the same time
    2. Which row in those worksheets (For example, row "10" or whatever, same row in all worksheets specified above)

    And can one button affect multiple worksheets according to the above specified code?

    Thanks!
    Last edited by nenadmail; 05-25-2012 at 04:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Macro code that hides or unhides rows in other worksheets

    Hi again...

    Pls upload sample file.. that will be of great help..
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Macro code that hides or unhides rows in other worksheets

    LIST-HR.xlsm
    Here is the sample file attached!
    Unprotect password: 1234

    See (Sheet4 "Uredi popis")... you will see the cells marked "HIDE/UNHIDE"... they need to hide or unhide rows in other worksheets, according to specifications I can edit in the code later.

    The code needs to work while the workbook and worksheets are under protection!
    Last edited by nenadmail; 05-25-2012 at 08:17 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Macro code that hides or unhides rows in other worksheets

    Hi

    Try this:

    nenadmail.xlsm

  5. #5
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Macro code that hides or unhides rows in other worksheets

    Thanks... it works if I wanted a dialogue box to come up... Sorry I wasn't clear.. I wanted to edit in the code itself for a code to permanently hide/unhide a row. Then I'm going to have a button for each row, as you've seen in the attachment, and I can easily edit the code for every row. And all I have to do is click on that button and it will hide/unhide rows in (not the existing sheet where the button is), but other sheets that I specify in the code, and all the same rows will hide in all the sheets I specify at the same time (Whether it's just one sheet or multiple sheets all at once, whatever I specify directly into the code itself). AND IMPORTANT: It needs to work while all the sheets and workbook are under password protection.

    It's like a control panel worksheet for other worksheets... if you look at the attachment again.

    Then using that code, I need to turn a cell into a button, instead of adding a button, as expressed in thread: http://www.excelforum.com/excel-prog...94#post2801794

    Can it be done that way?
    Last edited by nenadmail; 05-25-2012 at 04:17 PM.

+ 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