Date showing as numbers in Textbox on Userform

  • Thread starter Thread starter Cimjet
  • Start date Start date
C

Cimjet

Hi Everyone.
I've created a userform with a calendar to select the date, it's working ok on
the worksheet but on the Textbox on the userform its showing has just numbers
Same if the date was formatted as General. e.g. 40690.
I would like it to look like a date. can it be formatted to show as a date.
This is my code:
Private Sub Calendar1_Click()
Dim ws As Worksheet
Set ws = Worksheets("Input")
With frmInputLoc
Calendar1.Visible = True
r = Range("B65536").End(xlUp).Offset(1, 0).Select
r = CDbl(Calendar1.Value)
.TextBox1.Value = r
End With
End Sub
Best regards
Cimjet
 
Back
Top