Results 1 to 15 of 15

Thread: A date picker userform for Mac.

Hybrid 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,776
    It should work from another userform.

    I'm at work and can't test, but I would create a userform, with a command button, a text box and this code and see what happens.
    Private Sub CommandButton1_Click()
        Dim uiDate As String
        
        uiDate = macDate.Chosen
        
        If uiDate = False Then
            MsgBox "canceled"
        Else
            TextBox1.Text = Format(uiDate, "mm/dd/yyyy")
    End Sub
    The userform that is the date picker must be named macDate.

  2. #2

    thank you

    Quote Originally Posted by mikerickson View Post
    It should work from another userform.

    I'm at work and can't test, but I would create a userform, with a command button, a text box and this code and see what happens.
    Private Sub CommandButton1_Click()
        Dim uiDate As String
        
        uiDate = macDate.Chosen
        
        If uiDate = False Then
            MsgBox "canceled"
        Else
            TextBox1.Text = Format(uiDate, "mm/dd/yyyy")
    End Sub
    The userform that is the date picker must be named macDate.
    __________


    mikerickson you are the bomb! totally saved my life it would have taken me months if not years to determine how to program that. thank you for sharing your knowledge and please continue to do so!

  3. #3
    VBAX Newbie
    Joined
    Apr 2015
    Posts
    2
    Location
    Very cool. thanks Mike.

  4. #4
    Thank you!

    Quote Originally Posted by mikerickson View Post
    It should work from another userform.

    I'm at work and can't test, but I would create a userform, with a command button, a text box and this code and see what happens.
    Private Sub CommandButton1_Click()
        Dim uiDate As String
        
        uiDate = macDate.Chosen
        
        If uiDate = False Then
            MsgBox "canceled"
        Else
            TextBox1.Text = Format(uiDate, "mm/dd/yyyy")
    End Sub
    The userform that is the date picker must be named macDate.

Posting Permissions

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