Date showing as numbers in Textbox on Userform

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top