LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Formatting Textbox, passing values to worksheet

Hi There, I have a userform that when run picks up values from a worksheet.
I need to be able to enter values into these textbox's which would update
the value on the worksheet. I also want the textbox's to format itself. So
if I enter 150 it would format itself to $150.00 when I press enter... on
enter I need to switch to the next textbox.
My textbox's are numbered textbox1 - textbox50 and the worksheet reference
is sheet1 A100 - A150.
I also need textbox51 to sum these textbox's or worksheet ranges as I change
the values of the textbox's.

I'm using the EnterKeyBehavior=True, I have set each textbox's ControlSource
to the Worksheet Range.
I'm using Textbox?.text=Format(Textbox?.text,"#,####.00")
If I type in 150 and hit enter... it still says 150. If I click on the
textbox with the mouse it formats correctly until I leave the textbox. I've
also placed the format commands into the textbox.Change event.

What would be the best way to handle this situation?

Thanks in Advance!
Craig


 
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
Copying values and formatting but not formulae to new worksheet with VBA [email protected] Excel Programming 3 October 28th 05 02:27 PM
Passing Values Information Hog[_6_] Excel Programming 6 August 23rd 05 04:06 PM
put worksheet values into textbox on form thmort Excel Programming 2 July 17th 05 09:39 AM
Excel VBA - Problem calculating and passing values to another worksheet DanielCox Excel Programming 1 August 31st 04 12:36 PM
Calling a Sub passing Textbox name Ducttape19 Excel Programming 2 April 7th 04 01:35 PM


All times are GMT +1. The time now is 08:37 AM.

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"