S
Sandy
I am getting a runtime error 438 at the line between asterisks - can anyone
tell me why?
For Each MyCell In Range("C71:K71")
If MyCell.Value = vbNullString Then
With MyCell.Offset(1)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
With MyCell.Offset(2)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
ElseIf MyCell.Value <> "" Then
With MyCell.Offset(1)
.Locked = False
With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Boundary,Lost
Ball,Water,Unplay,Other"
.IgnoreBlank = True
.InCellDropdown = True
End With
End With
End If
If MyCell.Offset(1).Value = vbNullString Then
With MyCell.Offset(2)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
ElseIf MyCell.Offset(1).Value <> "" Then
With MyCell.Offset(2)
.Locked = False
.Validation.Delete
*******
.Add Type:=xlValidateList, Formula1:="Boundary,Lost
Ball,Water,Unplay,Other"
*******
.IgnoreBlank = True
.InCellDropdown = True
End With
End If
Next MyCell
Thanks
Sandy
tell me why?
For Each MyCell In Range("C71:K71")
If MyCell.Value = vbNullString Then
With MyCell.Offset(1)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
With MyCell.Offset(2)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
ElseIf MyCell.Value <> "" Then
With MyCell.Offset(1)
.Locked = False
With .Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Boundary,Lost
Ball,Water,Unplay,Other"
.IgnoreBlank = True
.InCellDropdown = True
End With
End With
End If
If MyCell.Offset(1).Value = vbNullString Then
With MyCell.Offset(2)
.Validation.Delete
.Value = vbNullString
.Locked = True
End With
ElseIf MyCell.Offset(1).Value <> "" Then
With MyCell.Offset(2)
.Locked = False
.Validation.Delete
*******
.Add Type:=xlValidateList, Formula1:="Boundary,Lost
Ball,Water,Unplay,Other"
*******
.IgnoreBlank = True
.InCellDropdown = True
End With
End If
Next MyCell
Thanks
Sandy