Macro running a macro NEED HELP

NX555V

Board Regular
Joined
Feb 27, 2007
Messages
159
Hello,

I hope everyone is well, thanks in advance for your support.

Here is my question...

I have a macro that unhides rows, the same rows in multiple worksheets. I created the macro below to run each of the above macros so that with one macro all the rows get unhidden in all the sheets. However, I get an error: Unable to set the Hidden property of the Range class.

How do I fix this? Thanks again!

Macro:

Sub ALLSLA()

CMGSLA.CMGSLA
COLSLA.COLSLA
COSDSLA.COSDSLA
EDSLA.EDSLA
EPGSLA.EPGSLA
ESMDSLA.ESMDSLA
FINSLA.FINSLA
HRSLA.HRSLA
LCASLA.LCASLA
MBDSLA.MBDSLA
MEGSLA.MEGSLA
MSITSLA.MSITSLA
MSRSLA.MSRSLA
OEMSLA.OEMSLA
OSGSLA.OSGSLA
PSDFINSLA.PSDFINSLA
SANDMSLA.SANDMSLA
SEARCHSLA.SEARCHSLA
SMSPSLA.SMSPSLA
STBSLA.STBSLA
USCORPSLA.USCORPSLA
VALERBSLA.VALERBSLA
WEXSLA.WEXSLA
WINCLISLA.WINCLISLA
WLPSLA.WLPSLA
WLXSLA.WLXSLA

End Sub

Here is one of the macros above, they are all the same except for the sheet name:

Sub CMGSLA()
'
' CMG MARKETING SLA (shows) Macro
'
Application.ScreenUpdating = False

Sheets("CMG MARKETING").Unprotect
Rows("55:56").Select
Selection.EntireRow.Hidden = False

Rows("58:59").Select
Selection.EntireRow.Hidden = False

Rows("62:63").Select
Selection.EntireRow.Hidden = False

Rows("65:66").Select
Selection.EntireRow.Hidden = False

Rows("69:70").Select
Selection.EntireRow.Hidden = False

Rows("72:73").Select
Selection.EntireRow.Hidden = False

Rows("76:77").Select
Selection.EntireRow.Hidden = False

Rows("79:80").Select
Selection.EntireRow.Hidden = False

Rows("83:84").Select
Selection.EntireRow.Hidden = False

Rows("86:87").Select
Selection.EntireRow.Hidden = False

Sheets("CMG MARKETING").Protect
Range("A16").Select

Application.ScreenUpdating = False

End Sub
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
are the sheets or workbook protected? i have had that message before for a similar problem.
 
Upvote 0
Yes, they are password protected, however the macro to unhide the rows does unprotect the sheet. Thanks
 
Upvote 0
maybe post your macros for review. its hard to tell whats what with the "run all" macro above.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top