C
chacha
Hi everyone
My code bugs out, at my second validation list. This works if I do in the
spreadsheet without code, but it doesn't work with my code. If anyone can
suggest anything it would be great!
For i = 1 To nMembers
startPoint.Offset(i, 0).EntireRow.Insert
startPoint.Offset(i, 0) = i
startPoint.Offset(i, 3).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:=_ xlBetween, Formula1:="=Sections"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
startPoint.Offset(i, 4).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween,
Formula1:="=INDIRECT(SUBSTITUTE($D$24,"""""""",""""""""))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Next i
My code bugs out, at my second validation list. This works if I do in the
spreadsheet without code, but it doesn't work with my code. If anyone can
suggest anything it would be great!
For i = 1 To nMembers
startPoint.Offset(i, 0).EntireRow.Insert
startPoint.Offset(i, 0) = i
startPoint.Offset(i, 3).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:=_ xlBetween, Formula1:="=Sections"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
startPoint.Offset(i, 4).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween,
Formula1:="=INDIRECT(SUBSTITUTE($D$24,"""""""",""""""""))"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Next i