ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input for TextBox having a mask for date or $ amount (https://www.excelbanter.com/excel-programming/339018-input-textbox-having-mask-date-%24-amount.html)

jlroper[_4_]

Input for TextBox having a mask for date or $ amount
 

I have a form that I would like to make some TextBox's to be formatted
for dates (having a mask for m/d/yy), and then a couple for dollar
amounts $X.XX. Can someone please tell how this is done (any where it
needs to be put if it is a specific placement).

I've tried:

CRF_Form.TextBox1.Value = Format(Date, "m/d/yy")

I've seen other people trying this (it doesn't change the data when
entering in the data though).

Thanks. :confused:


--
jlroper
------------------------------------------------------------------------
jlroper's Profile: http://www.excelforum.com/member.php...o&userid=26709
View this thread: http://www.excelforum.com/showthread...hreadid=401396


Dave Peterson

Input for TextBox having a mask for date or $ amount
 
Excel's textbox doesn't support this kind of masking.

You can apply the format when you leave the textbox, though--like with the code
you showed.

But for the date stuff...

You might want to take a look at Ron de Bruin's site for some tips/code/free
calendar control:
http://www.rondebruin.nl/calendar.htm

jlroper wrote:

I have a form that I would like to make some TextBox's to be formatted
for dates (having a mask for m/d/yy), and then a couple for dollar
amounts $X.XX. Can someone please tell how this is done (any where it
needs to be put if it is a specific placement).

I've tried:

CRF_Form.TextBox1.Value = Format(Date, "m/d/yy")

I've seen other people trying this (it doesn't change the data when
entering in the data though).

Thanks. :confused:

--
jlroper
------------------------------------------------------------------------
jlroper's Profile: http://www.excelforum.com/member.php...o&userid=26709
View this thread: http://www.excelforum.com/showthread...hreadid=401396


--

Dave Peterson

Vacation's Over

Input for TextBox having a mask for date or $ amount
 
http://www.fontstuff.com/vba/

calendar popup to assure date format is best way to go

"jlroper" wrote:


I have a form that I would like to make some TextBox's to be formatted
for dates (having a mask for m/d/yy), and then a couple for dollar
amounts $X.XX. Can someone please tell how this is done (any where it
needs to be put if it is a specific placement).

I've tried:

CRF_Form.TextBox1.Value = Format(Date, "m/d/yy")

I've seen other people trying this (it doesn't change the data when
entering in the data though).

Thanks. :confused:


--
jlroper
------------------------------------------------------------------------
jlroper's Profile: http://www.excelforum.com/member.php...o&userid=26709
View this thread: http://www.excelforum.com/showthread...hreadid=401396




All times are GMT +1. The time now is 05:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com