Hello
I have selected from MS WORD 2007, Developer section the Date Picker and set the Title and Tag to TargetDate.
I would like the end user to select only today or future dates and not be able to select past dates. Past dates can either be grayed or not be available.
I have added following codes and not sure if they are correct. New to VB.
Private Sub UserForm_Initialize()
' Check if active cell contains a date. If 'yes' show
' same date on calendar. If 'no' show today's date.
If IsDate(ActiveCell.Value) Then
targetdate.Value = DateValue(ActiveCell.Value)
Else
targetdate.Value = Date
End If
End Sub
--------------------------------
Sub targetdate()
' targetdate Macro
Targetdate.mindate.Value = Date
End Sub
Can anyone shed any light on this?
Thanks in advance