PC Review


Reply
Thread Tools Rate Thread

display special characters in some textbox fields to ensure data f

 
 
sam
Guest
Posts: n/a
 
      22nd Jul 2009
Hi All,

I have a excel userform which accepts user inputs and which is evevntually
saved in access database, In the userform i have textbox that accepts phone
numbers and money amounts. I want to display special characters in these
textbox fields to ensure data format.

For eg,

text box that accepts phone numbers, I want the textbox to display: "( )
- "
text box that accepts money amounts, I want to display a "$" sign before the
user input eg: $ 100,000
Also, is there a way to format the amount field such that it displays ","
and a "."
eg: 100,000,00.00

Hope I made it clear,

Thanks in advance



 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      22nd Jul 2009
Try the below..Adjust to suit your requirement..Also in tooltip you can
mention the format ..


Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1.Value, "$ #,##.00")
End Sub

Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2.Value, "(###) ###-####")
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"sam" wrote:

> Hi All,
>
> I have a excel userform which accepts user inputs and which is evevntually
> saved in access database, In the userform i have textbox that accepts phone
> numbers and money amounts. I want to display special characters in these
> textbox fields to ensure data format.
>
> For eg,
>
> text box that accepts phone numbers, I want the textbox to display: "( )
> - "
> text box that accepts money amounts, I want to display a "$" sign before the
> user input eg: $ 100,000
> Also, is there a way to format the amount field such that it displays ","
> and a "."
> eg: 100,000,00.00
>
> Hope I made it clear,
>
> Thanks in advance
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Special Characters and TEXTBOX =?Utf-8?B?ZG90bmV0dGVzdGVy?= Microsoft ASP .NET 3 22nd Jul 2005 10:00 PM
Special characters in form fields Arvind Microsoft ASP .NET 0 18th Mar 2004 03:27 AM
Special characters in form fields Arvind Microsoft Dot NET 0 18th Mar 2004 03:25 AM
IE won't display some special characters Moriel Windows XP Internet Explorer 2 10th Mar 2004 03:50 AM
display arabic characters in special fields Ramadan Windows XP Basics 0 15th Dec 2003 03:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 PM.