Calendar output

P

Patrick C. Simonds

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
 
D

Doug Robbins - Word MVP

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.

--
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
 

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

Similar Threads

Document save question 2
Multipage UserForm 3
Saving a document 3
Spell check a TextBox 2
Set ActiveDocument Variable 13
Template macro 0
Calander is Wrong 2
phatom message in Outlook 2003 1

Top