Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sebatian
I have try this to but it is the same result When i beginn write in textbox10 then the ciffers don't come as it shall if i write 3250 then the result with textbox10.value = format(textbox10.value,"#,000.00") are 003,01 and is the same with formatnumber I can use formatnumber if I in a textbox say Formatnumber(textbox1.value + textbox2.value) if textbox1 = 1000 and textbox2 = 1000 then the result of formatnumber is 2.000,00 but can't i force it to work in a textbox where i write the value, so if I write 100 then the textbox will write 100,00 Regards alvin "sebastienm" skrev: Hi Alvin, I think FormatNumber is a method/property for cells in a worksheet. For textboxes, i believe you should use the Format function instead of FormatNumber. Example, setting format to #,000.00 bellow: Private Sub TextBox10_Change() textbox10.value = format(textbox10.value,"#,000.00") End Sub Regards, Sebastien "Alvin Hansen" wrote: Hi I use formatnumber in my userform its working allright when i use it in a textbox there acculate two other textbox but how can i use formatnumber in a textbox where i can write and change the value in my userform If i have a checkbox Private Sub TextBox10_Change() textbox10.value = formatnumber(textbox10.value) end sub This dosn't work so what shall i do??? regards alvin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ohh ok, you are not in the US where the ',' and the '.' mean exactly the
contrary. Therefore, try: textbox10.value = format(textbox10.value,"#.000,00") but not sure. Check at the help file on that function for use in your language. Regards, Sebastien "Alvin Hansen" wrote: Hi Sebatian I have try this to but it is the same result When i beginn write in textbox10 then the ciffers don't come as it shall if i write 3250 then the result with textbox10.value = format(textbox10.value,"#,000.00") are 003,01 and is the same with formatnumber I can use formatnumber if I in a textbox say Formatnumber(textbox1.value + textbox2.value) if textbox1 = 1000 and textbox2 = 1000 then the result of formatnumber is 2.000,00 but can't i force it to work in a textbox where i write the value, so if I write 100 then the textbox will write 100,00 Regards alvin "sebastienm" skrev: Hi Alvin, I think FormatNumber is a method/property for cells in a worksheet. For textboxes, i believe you should use the Format function instead of FormatNumber. Example, setting format to #,000.00 bellow: Private Sub TextBox10_Change() textbox10.value = format(textbox10.value,"#,000.00") End Sub Regards, Sebastien "Alvin Hansen" wrote: Hi I use formatnumber in my userform its working allright when i use it in a textbox there acculate two other textbox but how can i use formatnumber in a textbox where i can write and change the value in my userform If i have a checkbox Private Sub TextBox10_Change() textbox10.value = formatnumber(textbox10.value) end sub This dosn't work so what shall i do??? regards alvin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for your help
Regards alvin "sebastienm" skrev: ohh ok, you are not in the US where the ',' and the '.' mean exactly the contrary. Therefore, try: textbox10.value = format(textbox10.value,"#.000,00") but not sure. Check at the help file on that function for use in your language. Regards, Sebastien "Alvin Hansen" wrote: Hi Sebatian I have try this to but it is the same result When i beginn write in textbox10 then the ciffers don't come as it shall if i write 3250 then the result with textbox10.value = format(textbox10.value,"#,000.00") are 003,01 and is the same with formatnumber I can use formatnumber if I in a textbox say Formatnumber(textbox1.value + textbox2.value) if textbox1 = 1000 and textbox2 = 1000 then the result of formatnumber is 2.000,00 but can't i force it to work in a textbox where i write the value, so if I write 100 then the textbox will write 100,00 Regards alvin "sebastienm" skrev: Hi Alvin, I think FormatNumber is a method/property for cells in a worksheet. For textboxes, i believe you should use the Format function instead of FormatNumber. Example, setting format to #,000.00 bellow: Private Sub TextBox10_Change() textbox10.value = format(textbox10.value,"#,000.00") End Sub Regards, Sebastien "Alvin Hansen" wrote: Hi I use formatnumber in my userform its working allright when i use it in a textbox there acculate two other textbox but how can i use formatnumber in a textbox where i can write and change the value in my userform If i have a checkbox Private Sub TextBox10_Change() textbox10.value = formatnumber(textbox10.value) end sub This dosn't work so what shall i do??? regards alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|