Hey
Pretty basic, but I want a script to add a date validation to a cell so that the user can only enter in the format of xx/xx/xxxx
I would also like the error to indicate this to the user as well
Thanks in advance
Hey
Pretty basic, but I want a script to add a date validation to a cell so that the user can only enter in the format of xx/xx/xxxx
I would also like the error to indicate this to the user as well
Thanks in advance
Here's a recording:
Any more details, maybe we can edit this into something more useful.![]()
Sub DV() ' ' DV Macro ' ' With Selection.Validation .Delete .Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="mm/dd/yyyy" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "ErrMess" .InputMessage = "" .ErrorMessage = "Must be xx/xx/xxxx" .ShowInput = True .ShowError = True End With End Sub
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
Got it, nice one!
Thanks!
You're welcome!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks