Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default textbox.value doesn't create a number?

Obviously, I am mistaken, but I thought if i told a userform wth text
boxes on it to treat the inputs as numbers, they would become numbers.

I tried to add two numbers that were in the text boxes, but instead of
a + b, I got the string, ab ... any suggestions?


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default textbox.value doesn't create a number?

Larry,

Try something like

MsgBox CLng(TextBox1.Text) + CLng(TextBox2.Text)


--

HTH

Bob Phillips

"Larry Levinson" wrote in message
...
Obviously, I am mistaken, but I thought if i told a userform wth text
boxes on it to treat the inputs as numbers, they would become numbers.

I tried to add two numbers that were in the text boxes, but instead of
a + b, I got the string, ab ... any suggestions?


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default textbox.value doesn't create a number?

or, this:

bn_first = Sheets("Japan").Range("c10000").Value +
Sheets("Japan").Range("e10000").Value

once I stuff the data on the sheet, that is.
"Bob Phillips" wrote:

Larry,

Try something like

MsgBox CLng(TextBox1.Text) + CLng(TextBox2.Text)


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number format TextBox? hoyos Excel Discussion (Misc queries) 2 November 8th 09 11:04 PM
How to create a Textbox in a standalone Excel 2007 chart using mac ew_jammer Charts and Charting in Excel 0 May 18th 09 08:11 PM
Verify Textbox Information is a Number and Not Text pallaver Excel Discussion (Misc queries) 6 July 17th 08 09:00 AM
Assigning Row Number to TextBox Ayo Excel Discussion (Misc queries) 0 May 30th 08 08:24 PM
Userform textbox number formats PhilM Excel Discussion (Misc queries) 2 June 7th 06 11:08 AM


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"