Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Format Textbox w/ $ sign

I guess I'm not going to find this out with a search. Seems it would
be simple.

All I want is for TextBox10 to have a $ sign in it. I'll even let the
user supply the decimal.
I've tried variations of this in the initialization sub:
TextBox10 = Format(c, "###,###.##")
I've tried it w/ the C, w/o the C. With $ signs. Anything I could
think of. Any help would be appreciated.
Thanks
j.o.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Format Textbox w/ $ sign

Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox10.Value = Format(TextBox10.Value, "$ #,##.00")
End Sub


"jeff" wrote:

I guess I'm not going to find this out with a search. Seems it would
be simple.

All I want is for TextBox10 to have a $ sign in it. I'll even let the
user supply the decimal.
I've tried variations of this in the initialization sub:
TextBox10 = Format(c, "###,###.##")
I've tried it w/ the C, w/o the C. With $ signs. Anything I could
think of. Any help would be appreciated.
Thanks
j.o.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Format Textbox w/ $ sign

On Oct 2, 1:11*pm, Jeff wrote:
Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
* TextBox10.Value = Format(TextBox10.Value, "$ #,##.00")
End Sub



"jeff" wrote:
I guess I'm not going to find this out with a search. Seems it would
be simple.


All I want is for TextBox10 to have a $ sign in it. I'll even let the
user supply the decimal.
I've tried variations of this in the initialization sub:
TextBox10 = Format(c, "###,###.##")
I've tried it w/ the C, w/o the C. With $ signs. Anything I could
think of. Any help would be appreciated.
Thanks
j.o.- Hide quoted text -


- Show quoted text -


I do appreciate the help. But, it still doesn't show with the $ in the
textbox. I see the word "exit" in the statement you gave me. That
makes me wonder if I was misunderstood. What I want is for the
$ to show up in the textbox when the userform comes up. Then the
user puts in the amount.
thanks
j.o.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Format Textbox w/ $ sign

Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.TextBox10.Value = Format(Me.TextBox10.Value, "$ #,##.00")
End Sub

Private Sub UserForm_Initialize()
Me.TextBox10.Value = "$"

End Sub


"jeff" wrote:

On Oct 2, 1:11 pm, Jeff wrote:
Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox10.Value = Format(TextBox10.Value, "$ #,##.00")
End Sub



"jeff" wrote:
I guess I'm not going to find this out with a search. Seems it would
be simple.


All I want is for TextBox10 to have a $ sign in it. I'll even let the
user supply the decimal.
I've tried variations of this in the initialization sub:
TextBox10 = Format(c, "###,###.##")
I've tried it w/ the C, w/o the C. With $ signs. Anything I could
think of. Any help would be appreciated.
Thanks
j.o.- Hide quoted text -


- Show quoted text -


I do appreciate the help. But, it still doesn't show with the $ in the
textbox. I see the word "exit" in the statement you gave me. That
makes me wonder if I was misunderstood. What I want is for the
$ to show up in the textbox when the userform comes up. Then the
user puts in the amount.
thanks
j.o.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Format Textbox w/ $ sign

I'd go with the other Jeff's suggestion, except use the AfterUpdate
event instead. The Exit event will pointlessly fire every time you
leave the text box, even if it hasn't been updated.

Private Sub TextBox10_AfterUpdate()
Me.TextBox10.Value = Format(Me.TextBox10.Value, "$ #,##.00")
End Sub

Private Sub UserForm_Initialize()
Me.TextBox10.Value = "$"
End Sub


--JP


On Oct 2, 2:23*pm, jeff wrote:
On Oct 2, 1:11*pm, Jeff wrote:





Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
* TextBox10.Value = Format(TextBox10.Value, "$ #,##.00")
End Sub


"jeff" wrote:
I guess I'm not going to find this out with a search. Seems it would
be simple.


All I want is for TextBox10 to have a $ sign in it. I'll even let the
user supply the decimal.
I've tried variations of this in the initialization sub:
TextBox10 = Format(c, "###,###.##")
I've tried it w/ the C, w/o the C. With $ signs. Anything I could
think of. Any help would be appreciated.
Thanks
j.o.- Hide quoted text -


- Show quoted text -


I do appreciate the help. But, it still doesn't show with the $ in the
textbox. I see the word "exit" in the statement you gave me. That
makes me wonder if I was misunderstood. What I want is for the
$ * *to show up in the textbox when the userform comes up. Then the
user puts in the amount.
thanks
j.o.- Hide quoted text -

- Show quoted text -


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Number Format / Color and Sign Werner Rohrmoser Excel Worksheet Functions 2 May 15th 08 05:03 PM
Cannot change the format to $ sign because there is space Cynthia Amrit Excel Discussion (Misc queries) 5 June 8th 07 04:02 AM
how can i change dollar sign to rupee sign in sales invoice vishal kohli Excel Discussion (Misc queries) 3 May 10th 07 02:06 PM
how do i format cells with preceeding zeros & minus sign Homer Excel Worksheet Functions 2 May 31st 06 04:02 PM
XL invoice replace the dollar sign with euro sign Pamela casares New Users to Excel 2 December 16th 05 08:21 PM


All times are GMT +1. The time now is 12:21 AM.

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

About Us

"It's about Microsoft Excel"