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 / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

forms / text boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JT - 23 Jan 2006 19:51 GMT
I have 2 questions:

First, is there a way to format a text box for dates.  One of the text boxes
on my form is for the user to enter a date. I would like to format the text
box so all the user has to do is enter mmddyy and the field is automatically
populated as mm/dd/yy.

Second, is there a way select the entire field in a form.  Once the user
clicks enter on the form, a number of edits are performed.  If there is an
issue with the field, I would like to move the cursor back to the field in
question (setfocus - no problem) but then I would like to select whatever is
in the text box, so the user can just key over the existing info.  

Thanks for the help........
Signature

JT

Tom Ogilvy - 23 Jan 2006 20:07 GMT
There is no formatting a textbox.  You would have to use the change event or
one of the key events to handle the formatting.

use the selstart and sellength  properties of the textbox

TextBox1.SelStart = 1
TextBox1.SelLength = len(textbox1.Text)

Signature

Regards,
Tom Ogilvy

> I have 2 questions:
>
[quoted text clipped - 10 lines]
>
> Thanks for the help........
 
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.