Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Formatnumber

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Formatnumber

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Formatnumber

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"