mask for textbox

S

sjaan

Hi,

Can i create a mask for a textbox on a userform so that a
date can filled in? like dd-mm-yyyy. If so, can someone
tell me how?

Thanks,

Sjaan
 
W

Word Heretic

G'day "sjaan" <[email protected]>,

Double-click the textbox to show its properties, change Type to Date

Steve Hudson - Word Heretic Sydney Australia
Word eTutor

wordheretic.com


sjaan reckoned:
 
G

Guest

Hi Steve, thanks for the reply. However there's no
property Type for the box. I've also tried to change the
code from Range.Text in Range.Date but this results in an
error.

The thing is that the input must be a correct date.
Alternatives are perhaps a calendar control or boxes with
numbers and spinbuttons? I'm desperate....

Sjaan
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Are we talking about a userform (custom dialog) or a protected document with
formfields? Have you considered using the IsDate() function to check that
the entry is a valid date?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
G

Guest

It's a userform. I want the user to fill in a proper date
like dd-mm-yyyy with a mask like in Access. But I'm
afrais that isn't possible. So I have to use the Isdate()
function.

Thanks anyway,

Sjaan
 
W

Word Heretic

G'day <[email protected]>,

Kerrect. Also check out the format function.

Steve Hudson - Word Heretic Sydney Australia
Word eTutor

steve from wordheretic.com (Email replies require payment)
 

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