Hi dears
i have a file including 30 sheets . in some sheets i have one rectangle ( named "100" ) which must be hidden/unhidden and a rounded rectangle ( named "200" ) which must be colorized . i have written two macros for this matter . one of them is this :
Sub ProtBUDCOK()
'
' ProtBUDCOK Macro
'
'
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 200")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(187, 170, 43)
.Transparency = 0
.Solid
End With
Range("s1").Select
ActiveSheet.Shapes.Range(Array("Rectangle 100")).Select
ActiveSheet.Shapes.Range(Array("Rectangle 100")).Visible = msoFalse
End Sub
i want to run this macro and other one by bottoms in sheet1 for sheet2,sheet5,sheet6 and sheet9 ( with codenames ) . below code doesn't work maybe because of ActiveSheet part of above macro or wrong addressing in sheet names . please help me.
Sub RunOnAllSheets()
Application.ScreenUpdating = False
For Each Worksheet In ThisWorkbook.Worksheets
Debug.Print wrkSht.Name
Sheets(Array("Sheet2", "Sheet5", "Sheet6", "Sheet9")).Select
Call ProtBUDBOK
Next
Application.ScreenUpdating = True
End Sub
i have a file including 30 sheets . in some sheets i have one rectangle ( named "100" ) which must be hidden/unhidden and a rounded rectangle ( named "200" ) which must be colorized . i have written two macros for this matter . one of them is this :
Sub ProtBUDCOK()
'
' ProtBUDCOK Macro
'
'
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 200")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(187, 170, 43)
.Transparency = 0
.Solid
End With
Range("s1").Select
ActiveSheet.Shapes.Range(Array("Rectangle 100")).Select
ActiveSheet.Shapes.Range(Array("Rectangle 100")).Visible = msoFalse
End Sub
i want to run this macro and other one by bottoms in sheet1 for sheet2,sheet5,sheet6 and sheet9 ( with codenames ) . below code doesn't work maybe because of ActiveSheet part of above macro or wrong addressing in sheet names . please help me.
Sub RunOnAllSheets()
Application.ScreenUpdating = False
For Each Worksheet In ThisWorkbook.Worksheets
Debug.Print wrkSht.Name
Sheets(Array("Sheet2", "Sheet5", "Sheet6", "Sheet9")).Select
Call ProtBUDBOK
Next
Application.ScreenUpdating = True
End Sub