Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform & textboxes
hi!
i've made an userform which has several textboxes. i need to give to the textboxes some format. for example: textbox1 has to be currency format textbox2 has to be date format textbox3 has to be percent format how can i do this? tia. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform & textboxes
Private Sub TextBox1_AfterUpdate() With Me.TextBox1 .Value = Format(.Value, "$#,##0.00") End With End Sub Private Sub TextBox2_AfterUpdate() With Me.TextBox2 .Value = Format(.Value, "dd-mmm-yyyy") End With End Sub Private Sub TextBox3_AfterUpdate() With Me.TextBox3 .Value = Format(.Value, "0%") End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "beginner" wrote in message ... hi! i've made an userform which has several textboxes. i need to give to the textboxes some format. for example: textbox1 has to be currency format textbox2 has to be date format textbox3 has to be percent format how can i do this? tia. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform & textboxes
hi mr. phillips.
i found in excels' vba help the next tip: valor = Application.WorksheetFunction.VLookup(numero, serv, 79, false) frmResultado.txt1.Value = FormatCurrency(valor, 2) it works but i've had some troubles when the cell's format doesn't match with the FormatXXXXX function. (XXXXX = Currency, Number,TimeDate, Percent) any suggestion? tia. -----Original Message----- Private Sub TextBox1_AfterUpdate() With Me.TextBox1 .Value = Format(.Value, "$#,##0.00") End With End Sub Private Sub TextBox2_AfterUpdate() With Me.TextBox2 .Value = Format(.Value, "dd-mmm-yyyy") End With End Sub Private Sub TextBox3_AfterUpdate() With Me.TextBox3 .Value = Format(.Value, "0%") End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "beginner" wrote in message ... hi! i've made an userform which has several textboxes. i need to give to the textboxes some format. for example: textbox1 has to be currency format textbox2 has to be date format textbox3 has to be percent format how can i do this? tia. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform & textboxes
That is when you could use the custom formats as I suggested.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "beginner" wrote in message ... hi mr. phillips. i found in excels' vba help the next tip: valor = Application.WorksheetFunction.VLookup(numero, serv, 79, false) frmResultado.txt1.Value = FormatCurrency(valor, 2) it works but i've had some troubles when the cell's format doesn't match with the FormatXXXXX function. (XXXXX = Currency, Number,TimeDate, Percent) any suggestion? tia. -----Original Message----- Private Sub TextBox1_AfterUpdate() With Me.TextBox1 .Value = Format(.Value, "$#,##0.00") End With End Sub Private Sub TextBox2_AfterUpdate() With Me.TextBox2 .Value = Format(.Value, "dd-mmm-yyyy") End With End Sub Private Sub TextBox3_AfterUpdate() With Me.TextBox3 .Value = Format(.Value, "0%") End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "beginner" wrote in message ... hi! i've made an userform which has several textboxes. i need to give to the textboxes some format. for example: textbox1 has to be currency format textbox2 has to be date format textbox3 has to be percent format how can i do this? tia. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm TextBoxes | Excel Discussion (Misc queries) | |||
Multiple ComboBoxes and TextBoxes on Userform | Excel Programming | |||
userform textboxes again | Excel Programming | |||
userform textboxes | Excel Programming | |||
add numbers in textboxes on userform | Excel Programming |