![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: NSW. Australia
Posts: 64
|
I have a text box on a form that is used to add a number on to a sheet. The problem is that I need the number that the user enters to be converted to a negative value when it is transfered to the sheet
Any Ideas? Thanks in advance |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 41
|
Phil
Try using the Change event of the TextBox. I would suggest not setting the controlsource property for the TextBox. You will need to amend the code references to suit. Private Sub TextBox1_Change() Worksheets("Sheet1").Range("A1") = -TextBox1.Value End Sub Any help? Regards Robb__ |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: NSW. Australia
Posts: 64
|
Thanks Robb
Unfortunately I could not get it to work. It returns the subscript out of range error. However the answer was easy I Added , "-@") to the textbox line. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Posts: 206
|
Could you do a custom format the cell?
For example: -0.00
__________________
Win 98SE - Office 2K |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|