Hello Aussiebear
idea is the following of my excel file:
Assume that we are in London (UK), in England there are many cities.
We have 200 people working any products in every city (evenly distributed).
Several of us, however, work on special concrete products in the same cities that do not work on other people.
In a workbook we have many worksheets named with names of specific cities + other data.
Each of these worksheets in column A (in particular rows) are exactly the same only different cities (the names of the sheets).
At the end of each month, this file is sent to be examined by any person (representative).
In macros that I have shown and trying to do before I can send files to hide shown me lines (because there are products that should not be visible to others) and to lock all worksheets with names of cities.
Yes I have and I know the names of the worksheets to be hidden (rows) and locked worksheets.
In my macro so long (which is good for nothing) - the short version:
Only one button
macro to loop through all the worksheets with names of cities (I have to write it down in the macro what those cities) want to hide my rows and lock all worksheets (with city names).
Second macro - it unlock all the worksheets with the names of cities and unhide the hidden rows.
SamT
you write password of a workbook, and I do not have one (excel file is unlocked), I have (ie I want to have passwords worksheets - only selected sheets with names of cities).
I tried but your macro:
When I press the button once - as I I go up the word "write your password" then none of the sheets with names of cities not hide any mention of the desired row and lock them.
This is precisely why I asked if I wrong somewhere?
In the macro there were two mistakes that spelling is one that you mention, and the other (GotoUnHideSheets) and I fixed it for her (Goto UnHideSheets).
Please wholeheartedly look at my unworkmanlike macro that I put after hiding rows password worksheets and in your macro I dont see setting a password for worksheets.
Ie in the example that I gave put (write) password "kosta".
Thank you all for your support, I believe we can find a solution.
If you have more questions ask, I will answer, I just do not believe that I can create so many cares one macro.
Thanks again.