Attribute VB_Name = "DatePicker"
Public ourDate As String
Public strASLTitle As String
Public dt As Date
Public USFormat As Boolean
Public Sub DatePickerDisplay(Optional mydt As Date, Optional dtFormat As Variant, Optional Title As Variant)
Dim strFormat As String
If Not IsMissing(Title) Then
    strASLTitle = Title
End If
If IsMissing(dtFormat) Then
    USFormat = True
    strFormat = "mm\/dd\/yyyy"
    Else
        If dtFormat Then strFormat = "mm\/dd\/yyyy"
        If Not USFormat Then strFormat = "dd\/mm\/yyyy"
End If
If mydt = 0 Then
    mydt = Date
Else
    If IsDate(mydt) Then
        dt = mydt
    Else
        dt = Date
    End If
End If
dt = Format(mydt, strFormat)
frmDatePicker.Show
If ourDate <> "999" Then
    mydt = Format(ourDate, strFormat)
End If
End Sub
