Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Date showing as numbers in Textbox on Userform

hi,

r = CDate(Calendar1.Value)

--
isabelle

Le 2011-04-23 18:45, Cimjet a écrit :
r = CDbl(Calendar1.Value)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Date showing as numbers in Textbox on Userform

Merci Isabelle
Cimjet
"isabelle" wrote in message ...
hi,

r = CDate(Calendar1.Value)

--
isabelle

Le 2011-04-23 18:45, Cimjet a écrit :
r = CDbl(Calendar1.Value)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
View Numbers in Textbox in Proper Format in UserForm [email protected] Excel Programming 1 June 2nd 08 12:42 PM
How2 accept only numbers in userform textbox MARTY Excel Programming 9 January 5th 08 05:47 AM
Date Format in UserForm textbox. [email protected] Excel Programming 0 July 6th 07 03:52 PM
Showing a calculation in a userform Textbox [email protected] Excel Programming 3 August 3rd 06 01:29 PM
Max numbers of characters in userform textbox and cell N E Body Excel Programming 4 June 27th 05 06:25 PM


All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"