Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Formating currency in text box

This is the code I got yesterday, but I'm still having
problems.

Private Sub txtHouseCost_AfterUpdate()
txtHouseCost.Value = Format(CInt(txtHouseCost.Value), "#
##0 $")
End Sub
When I enter a number it rounds up or down, I lose the
digits after the decimal, and the $ is at the left end of
the number. The other problem I have is if I move the $
to the front, $# ##0 , the total doen't work. I'm using
Total = Val(txtHouseCost.Value) + Val(txtLotCost.Value) +
Val(txtOptionCost.Value)
Any ideas to help this old struggling newbie?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Formating currency in text box

Doug

Doug wrote:
This is the code I got yesterday, but I'm still having
problems.

Private Sub txtHouseCost_AfterUpdate()
txtHouseCost.Value = Format(CInt(txtHouseCost.Value), "#
##0 $")


=Format(txtHouseCost.Text, "$#,##0.00")

End Sub
When I enter a number it rounds up or down, I lose the
digits after the decimal, and the $ is at the left end of
the number. The other problem I have is if I move the $
to the front, $# ##0 , the total doen't work. I'm using
Total = Val(txtHouseCost.Value) + Val(txtLotCost.Value) +
Val(txtOptionCost.Value)


Total = CDbl(txtHouseCost.Text) + CDbl(txtLotCost.Text) etc...

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com


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
Currency formating Sallie[_2_] Excel Discussion (Misc queries) 4 July 25th 09 07:40 PM
Formating numbers &"Text" to appear as currency &"Text" in formula Robin K. Excel Discussion (Misc queries) 6 May 7th 07 02:03 PM
Conditional Formating - Currency EA Excel Discussion (Misc queries) 2 October 9th 06 08:20 PM
Currency formating problem Jerry Excel Discussion (Misc queries) 5 February 19th 05 06:39 PM
Currency formating problem jschm1957 Excel Discussion (Misc queries) 0 February 19th 05 04:09 AM


All times are GMT +1. The time now is 05:31 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"