S
Steve Klenner
I've had the following macro that has been working fine:
Sub MISalesTAX_Profile()
Application.ScreenUpdating = False
Dim sht As Worksheet
For Each sht In Sheets(Array("Sheet2", "Sheet3")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G57").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G57
sht.Range("F57").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F57
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet in Array
Sheets("Sheet1").Select 'Go to Sheet 1
Application.ScreenUpdating = True
End Sub
I'd like to do below......but it is NOT working: The Macro Doesn't Fail but it does not update Sheet4 and Sheet5
How do I get the Macro to follow the second set of sheet array's?
Sub MISalesTAX_Profile()
Application.ScreenUpdating = False
Dim sht As Worksheet
For Each sht In Sheets(Array("Sheet2", "Sheet3")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G57").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G57
sht.Range("F57").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F57
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet in Array
***********************************************************************************************************************************
For Each sht In Sheets(Array("Sheet4, "Sheet5")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G129").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G129
sht.Range("F129").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F129
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet In Array
***********************************************************************************************************************************
Sheets("Sheet1").Select 'Go to Sheet 1
Application.ScreenUpdating = True
End Sub
Thanks for any HELP!!!!!
Steve
Sub MISalesTAX_Profile()
Application.ScreenUpdating = False
Dim sht As Worksheet
For Each sht In Sheets(Array("Sheet2", "Sheet3")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G57").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G57
sht.Range("F57").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F57
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet in Array
Sheets("Sheet1").Select 'Go to Sheet 1
Application.ScreenUpdating = True
End Sub
I'd like to do below......but it is NOT working: The Macro Doesn't Fail but it does not update Sheet4 and Sheet5
How do I get the Macro to follow the second set of sheet array's?
Sub MISalesTAX_Profile()
Application.ScreenUpdating = False
Dim sht As Worksheet
For Each sht In Sheets(Array("Sheet2", "Sheet3")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G57").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G57
sht.Range("F57").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F57
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet in Array
***********************************************************************************************************************************
For Each sht In Sheets(Array("Sheet4, "Sheet5")) 'Selects sheet
sht.Unprotect Password:="lock" 'Unlock sheet
sht.Range("G129").FormulaR1C1 = "=R[-1]C*6%" 'Inputs 6% to Cell G129
sht.Range("F129").FormulaR1C1 = "MI Sales Tax" 'Inputs MI Sales Tax to Cell F129
sht.Protect Password:="lock" 'Locks Sheet
Next sht 'Next Sheet In Array
***********************************************************************************************************************************
Sheets("Sheet1").Select 'Go to Sheet 1
Application.ScreenUpdating = True
End Sub
Thanks for any HELP!!!!!
Steve