Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forms, TextBox
I tried using a simple assignment function:
Sheets("ShtNm").Range("A1") = UserForm1.TextBox1.Value .... and got a number. If you want to try something else, try forcing the conversion of the textbox input to a number using CDbl. ie: Sheets("ShtNm").Range("A1") = CDbl(UserForm1.TextBox1.Value) Just be sure to put in appropriate error handling for this in case the user enters a non-numeric input. HWH "Stuart Hodgson" wrote in message ... I am using a Form to obtain a users input and then taking those values and inserting them into a spreadsheet. The problem is that the spreadsheet does not treat the values as numbers. I am using activecell.value to insert the values from the form onto the spreadsheet and have tried using activecell.numberformat as well as using the onchange event for the textbox to format the value all to no avail. If anyone has an answer I would be most grateful. Many thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=EMBED("Forms.TextBox.1","") | Excel Discussion (Misc queries) | |||
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) | |||
TextBox | Excel Discussion (Misc queries) | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |