![]() |
![]() |
|
|||||||
| 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: Mar 2002
Location: Lat 51° 23.3 mins North Long 0° 24.7 Mins West
Posts: 174
|
Can any help me with this problem. I have a userform created in VBA which collects numeric data via a text box. However when I post the values from the text box they appear as text not numbers. What code do I need to stop this as its driving me up the wall!!
|
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
Excel has many Conversion function, such as CInt(), cLng() and Cdbl() But you should just be able to parse the text number to a numeric variable such as: Dim iMyNumber as Integer iMyNumber=TextBox1.Value Also the default Property for a Textbox is Text, so if just use: |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|