
Sub Modify()
'
' Modify Macro
'
'
ActiveSheet.Unprotect
Range("F17").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False
End Sub |
Sub Modify()
Dim X As Long, Y As Long
ActiveSheet.Unprotect
X = ActiveCell.Row
Y = ActiveCell.Column
Cells(X, Y).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False
End Sub |
Option Explicit
Sub Modify()
ActiveSheet.Unprotect
With ActiveCell.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=False
End Sub |
