R
Randy Numbers
Greetings,
My app contains 3 tabs, with a "superset" of rows on each. Depending upon
the view selected in cell B2 in TAB 1, I want to display different sets of
rows for each sheet. I have the logic that allows me to run a macro on each
tab that shows the right rows. Now what I want to do is have a single marco
that will set the rows on all three tabs at once.
Here's what I have:
Sub SHOWVIEWS()
SmartRefresh2 ("Background")
SmartRefresh2 ("IT Environ")
SmartRefresh2 ("Adv Options")
End Sub
_______
Sub SmartRefresh2(WSHEET)
....
Application.ScreenUpdating = False
With Worksheets(WSHEET)
.Unprotect Password:=Worksheets("background").Range("a1").Value
Cells.Select
UnhideAllRows2 (WSHEET)
.....
_______
Sub UnhideAllRows2(WSHEET2)
....
With Worksheets(WSHEET2)
.Unprotect Password:=Worksheets("background").Range("a1").Value
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
.....
___
Everything works as expected for Tab 1 when I make the change in cell B2;
however, I get an error when TAB 2 trys to get processed. Specifically, the
last two lines of the last macro ( Selection.EntireRow.Hidden = False)
returns an error "Unable to set the hidden property..."
I've checked, and the sheet is unlocked. Many, many thanks../Randy
My app contains 3 tabs, with a "superset" of rows on each. Depending upon
the view selected in cell B2 in TAB 1, I want to display different sets of
rows for each sheet. I have the logic that allows me to run a macro on each
tab that shows the right rows. Now what I want to do is have a single marco
that will set the rows on all three tabs at once.
Here's what I have:
Sub SHOWVIEWS()
SmartRefresh2 ("Background")
SmartRefresh2 ("IT Environ")
SmartRefresh2 ("Adv Options")
End Sub
_______
Sub SmartRefresh2(WSHEET)
....
Application.ScreenUpdating = False
With Worksheets(WSHEET)
.Unprotect Password:=Worksheets("background").Range("a1").Value
Cells.Select
UnhideAllRows2 (WSHEET)
.....
_______
Sub UnhideAllRows2(WSHEET2)
....
With Worksheets(WSHEET2)
.Unprotect Password:=Worksheets("background").Range("a1").Value
Cells.Select
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
.....
___
Everything works as expected for Tab 1 when I make the change in cell B2;
however, I get an error when TAB 2 trys to get processed. Specifically, the
last two lines of the last macro ( Selection.EntireRow.Hidden = False)
returns an error "Unable to set the hidden property..."
I've checked, and the sheet is unlocked. Many, many thanks../Randy