Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 2 text boxes within a user form called "EnterNewConsult" that I need
to format. One text box called "Date of Consult" needs to be formatted in the 00/00/00 date format, and the other called "Quote Amount" needs to be formatted as $0.00. Can you help me figure out what the code would look like for those? Also, how would I go about entering all of the values in my text boxes from the user form into their corresponding cells within the workbook? Your help is greatly appreciated! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Give this a try:
TextBox1.Text = Format(CDbl(TextBox1.Text), "$#,##0.00") TextBox1.Value = Format(TextBox1.Value, "dd/mm/yyyy") Regards, Ryan--- -- RyGuy "Jacy Erdelt" wrote: I have 2 text boxes within a user form called "EnterNewConsult" that I need to format. One text box called "Date of Consult" needs to be formatted in the 00/00/00 date format, and the other called "Quote Amount" needs to be formatted as $0.00. Can you help me figure out what the code would look like for those? Also, how would I go about entering all of the values in my text boxes from the user form into their corresponding cells within the workbook? Your help is greatly appreciated! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh, just noticed the second pary of your question.
Private Sub CommandButton1_Click() Sheets("Sheet1").Activate Cells(1, 1) = TextBox1.Text Cells(2, 1) = TextBox2.Text End Sub Remember, (1,1) is Cell A1, (2,1) is Cell A2, etc. Regards, Ryan--- "ryguy7272" wrote: Give this a try: TextBox1.Text = Format(CDbl(TextBox1.Text), "$#,##0.00") TextBox1.Value = Format(TextBox1.Value, "dd/mm/yyyy") Regards, Ryan--- -- RyGuy "Jacy Erdelt" wrote: I have 2 text boxes within a user form called "EnterNewConsult" that I need to format. One text box called "Date of Consult" needs to be formatted in the 00/00/00 date format, and the other called "Quote Amount" needs to be formatted as $0.00. Can you help me figure out what the code would look like for those? Also, how would I go about entering all of the values in my text boxes from the user form into their corresponding cells within the workbook? Your help is greatly appreciated! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for your suggestion. It was heading in the right direction, but it
didn't quite give me the result I was hoping for. The box with the date, for instance, only allows you to input 1 number before it automatically populates with a date (enter 1, and 30/12/1899 comes up). And with the amount, the first number entered is always the dollar amount and the second number entered comes up as the cents (enter 1 & 2, $1.20 comes up). If I leave the decimal out of the equation then it will allow me to enter all numbers accurately, except the cents. If you have any thoughts on this, please let me know. Thank you, again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
how to use text boxes as an array in an EXCEL user form | Excel Programming | |||
Setting an array of text boxes equal to individual form text boxes | Excel Programming | |||
User form and text boxes on charts | Excel Programming | |||
Auto fill text boxes in user form by inputting data in another | Excel Programming |