Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
This is probably a very silly questiong but i can't find how to solve it. I have made a form that you enter in data and it puts it into cells on a spreadsheet, some of it is a numerical amount. These amounts are then referred to in other formulas. Despite the cells being in the 'accounting' format, they still appear to be just in text, and not even me reformatting the cell will chage them to any kind of number. Is there a way of formatting the textbox, in the visual basic form, to be a number? or some piece of code to enter it as a number? The code i am currently using is as follows: Sheets("in").Range("i7").Value = net 'net' being the name of the text box that the amount is entered into. I hope someone could please help. Thanks |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks very much!
"Bob Phillips" wrote: Sheets("in").Range("i7").Value = Format(net.Text,"$#,##0.00") -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "James Millsted" <James wrote in message ... Hi, This is probably a very silly questiong but i can't find how to solve it. I have made a form that you enter in data and it puts it into cells on a spreadsheet, some of it is a numerical amount. These amounts are then referred to in other formulas. Despite the cells being in the 'accounting' format, they still appear to be just in text, and not even me reformatting the cell will chage them to any kind of number. Is there a way of formatting the textbox, in the visual basic form, to be a number? or some piece of code to enter it as a number? The code i am currently using is as follows: Sheets("in").Range("i7").Value = net 'net' being the name of the text box that the amount is entered into. I hope someone could please help. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
visual basic user form date format dd/mm/yy not mm/dd/yy | Excel Discussion (Misc queries) | |||
Visual Basic and SP2 | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
Visual Basic | Excel Discussion (Misc queries) | |||
Visual Basic Help | Excel Discussion (Misc queries) |