Hidden Dan
Board Regular
- Joined
- Dec 7, 2016
- Messages
- 63
A spreadsheet needs option to insert 2 different dates. It allows user to select one the 2. This can normally be done with 'Data Validation', selecting "List" and fill in "Source". Source may be a list elsewhere but can also be typed in directly by typing e.g. 1;2;3 . This method works for normal spreadsheets.
If I record a macro it looks like this :
Sub Macro1()
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="1;2;3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
My question is "how can I interrupt macro at "Formula1:=", allow user to type in 2 values and resume macro execution ? Typing values may be done purely manual by typing values and separating them by ";".
Note: I use a non-English language Excel version, so maybe some confusion may arise when separating items (swapping "," for ";").
Thanks for your help
Dan
If I record a macro it looks like this :
Sub Macro1()
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="1;2;3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
My question is "how can I interrupt macro at "Formula1:=", allow user to type in 2 values and resume macro execution ? Typing values may be done purely manual by typing values and separating them by ";".
Note: I use a non-English language Excel version, so maybe some confusion may arise when separating items (swapping "," for ";").
Thanks for your help
Dan