Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i'm try to run a textbox in a userform, to an excel worksheet , using the textbox as a number .problem is that when i send the number to excel worksheet ,it comes in a text form, which the number then won't add ,subtract ,divide ,ect
code is Private Sub TextBox1_change( Dim c As Rang Set c = Worksheets("Sheet1").Range("a2" c.Value = TextBox oh ,i have even formated the excell -cell ,still no luck |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Scott,
It does create a text string in A2, but as it is all numeric, any other math operations on that cell do an implicit conversion to numeric, so it should be okay. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "scott t" wrote in message ... i'm try to run a textbox in a userform, to an excel worksheet , using the textbox as a number .problem is that when i send the number to excel worksheet ,it comes in a text form, which the number then won't add ,subtract ,divide ,ect. code is: Private Sub TextBox1_change() Dim c As Range Set c = Worksheets("Sheet1").Range("a2") c.Value = TextBox1 oh ,i have even formated the excell -cell ,still no luck |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Scott,
change the line: c.Value = TextBox1 to: c.Value = Me.TextBox1.Value Troy "scott t" wrote in message ... i'm try to run a textbox in a userform, to an excel worksheet , using the textbox as a number .problem is that when i send the number to excel worksheet ,it comes in a text form, which the number then won't add ,subtract ,divide ,ect. code is: Private Sub TextBox1_change() Dim c As Range Set c = Worksheets("Sheet1").Range("a2") c.Value = TextBox1 oh ,i have even formated the excell -cell ,still no luck |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if isnumeric(Texbox1.Value) then
c.Value = cdbl(TextBox1.Value) else c.Value = TextBox1.Value End if -- Regards, Tom Ogilvy "scott t" wrote in message ... i'm try to run a textbox in a userform, to an excel worksheet , using the textbox as a number .problem is that when i send the number to excel worksheet ,it comes in a text form, which the number then won't add ,subtract ,divide ,ect. code is: Private Sub TextBox1_change() Dim c As Range Set c = Worksheets("Sheet1").Range("a2") c.Value = TextBox1 oh ,i have even formated the excell -cell ,still no luck |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have had the same proble
A work around that I came up with was to put the results in a cell and then use the =value(cell) to convert it to a numeric format |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
Calculate Textbox value based on another textbox value.doc | Excel Discussion (Misc queries) | |||
Calculate Textbox value based on another textbox value | Excel Discussion (Misc queries) | |||
Userform Textbox Currency Format Problems | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |