Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Calendar output

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 14 Jul 2007 22:48 GMT
I use the code below to place a date on my form. Is there any way to change
the format of the result to a 2 digit month, 2 digit day and 2 digit year.
currently what I get is 4/18/2007.

Private Sub CommandButton1_Click()
UserForm8.TextBox16.Value = Calendar1.Value
Unload UserForm21
End Sub

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 000756-1, 07/13/2007
Tested on: 7/14/2007 2:48:21 PM
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com
Doug Robbins - Word MVP - 14 Jul 2007 23:11 GMT
Use the Format function

UserForm8.TextBox16.Value = Format(Calendar1.Value, "MM/dd/yyyy")

See my comment in your later post about giving meaningful names to your
controls.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I use the code below to place a date on my form. Is there any way to change
>the format of the result to a 2 digit month, 2 digit day and 2 digit year.
[quoted text clipped - 11 lines]
> avast! - copyright (c) 1988-2007 ALWIL Software.
> http://www.avast.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.