Results 1 to 7 of 7

Thread: Userform submitting a date in format "mmm-yy", but a small problem arises.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Tutor david000's Avatar
    Joined
    Mar 2007
    Location
    Chicago
    Posts
    276
    Location
    This worked for me.

    Private Sub CommandButton1_Click()
    Dim lr As Long
    lr = Cells(Rows.Count, 1).End(xlUp).Row + 1
    Cells(lr, 1) = DateSerial(Year(TextBox1.Value), Month(TextBox1.Value), 1)
    End Sub
    Last edited by david000; 03-25-2014 at 05:04 PM. Reason: double checked
    "To a man with a hammer everything looks like a nail." - Mark Twain

Posting Permissions

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