Descricao: |
Saberexcel - o site das macros
Proteger as células com formulas com macro método validação dados Macro do Aplicativo Microsoft Excel VBA, que proteja minhas fórmulas pela Validação de Dados,
Sub Proteger_Formulas() Range("A1").Select On Error Resume Next Selection.SpecialCells(xlCellTypeFormulas, 23).Select
With Selection.Validation .Delete .Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:=">1" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "Existe Fórmula - não digite!" .InputMessage = "" .ErrorMessage = "Célula com Fórmula está protegida!!""" .ShowInput = True 'Mude para FALSE para desproteger a células .ShowError = True 'Mude para FALSE para desproteger a células
End With End Sub
Aprenda Aplicativo Microsoft Excel VBA(Visual Basic Application) --((SaberExcel))--

|