Porém, preciso fazer isso em mais de uma Planilha... quando copio o código e mudo as células não da certo... Ele só bloqueia as células da ultima planilha(Rateios)
Código: Selecionar todos
Option Explicit
Sub Bloquear_Soja()
OPERATIVO.Select
Range("P8,P11,P14,P17,P20,P23,P26,P29,P32,P35,P42,Z8,Z11,Z14,Z17,Z20,Z23,Z26,Z29,Z32,Z35,AJ8,AJ11,AJ14,AJ17,AJ20,AJ23,AJ26,AJ29,AJ32,AJ35").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
RATEIOS.Select
Range("F8,F11,F14,P8,P11,P14,Z8,Z11,Z14,AJ8,AJ11,AJ14").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub Desbloquear_Soja()
OPERATIVO.Select
ActiveSheet.Unprotect
Range("P8,P11,P14,P17,P20,P23,P26,P29,P32,P35,P42,Z8,Z11,Z14,Z17,Z20,Z23,Z26,Z29,Z32,Z35,AJ8,AJ11,AJ14,AJ17,AJ20,AJ23,AJ26,AJ29,AJ32,AJ35").Select
Selection.Locked = False
Selection.FormulaHidden = True
RATEIOS.Select
ActiveSheet.Unprotect
Range("F8,F11,F14,P8,P11,P14,Z8,Z11,Z14,AJ8,AJ11,AJ14").Select
Selection.Locked = False
Selection.FormulaHidden = True
End Sub