View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cimjet[_3_] Cimjet[_3_] is offline
external usenet poster
 
Posts: 157
Default Date showing as numbers in Textbox on Userform

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