Consulting

Results 1 to 15 of 15

Thread: A date picker userform for Mac.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778

    A date picker userform for Mac.

    People have been inquiring about a Date Picker for Mac, so I came up with this userform.
    The syntax for using it is
    Dim uiDate As Double
    Dim strPrompt As String
    strPrompt = "Please enter the date of your choosing."
    uiDate = macDate.Chosen(strPrompt, Default:=DateSerial(1919, 5, 3), Title:="Pick a Date", DefaultButton:=vbDefaultButton1)
    '  all arguments are optional
    ' defaults prompt="Choose a date.", default=today's date, title="Choose Date", defaultButton=vbDefaultButton1
    If uiDate = False Then
        Rem MsgBox "canceled"
    Else
        MsgBox "You chose " & Format(uiDate, "d. mmm, yyyy.")
    End If
    The sub FillMacDateWithControls will take an empty userform, named macDate, and put the necessary controls in the proper place.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •