A rotina de desproteger/proteger remetem/atuam na sheet activa (activesheet), então sem alterar essas rotinas, ative a shhet(x)
Sub Perfil()
Dim sheetsArray As Variant
sheetsArray = Array("Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez")
For Each x In sheetsArray
Sheets(x).Activate
With Sheets(x)
Call Secure.Desprotege
.Range("B7").FormulaLocal = "123.456"
.Range("F7").FormulaLocal = "Maria"
Call Secure.Protege
End With
Next x
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 23/02/2017 12:59 pm