Consulting

Results 1 to 3 of 3

Thread: Solved: Date not updated from the calendar popup

  1. #1

    Solved: Date not updated from the calendar popup

    Hi,
    I've calendar popup functionality enabled in the excel file range F2, J5:J14
    I've two command buttons - OK, Cancel.
    When i select a date and click OK, the date is not updated in the sheet.
    Similarly, Cancel button.
    Please help me, attached the file for your ref.

    Raj

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Your cancel and ok buttons were not the ones you thought. Doubleclick your command buttons on the userform in the VBE to get to the right code for them.
    [vba]Private Sub CommandButton3_Click()
    Unload Me
    End Sub

    Private Sub CommandButton4_Click()
    ActiveCell.Value = Calendar1.Value
    Unload me
    End Sub

    'a doubleclick might be nice
    Private Sub Calendar1_DblClick()
    ActiveCell.Value = Calendar1.Value
    Unload Me
    End Sub[/vba]

  3. #3
    Got it thanks.

Posting Permissions

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