Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Printing integers from a userform

I have a userform on an excel workbook that takes numerical input from a user
and should paste those values to another workbook. This works fine; however,
it pastes the numbers as text format instead of number format. How do I get
the values to be number format not text?

Thanks for any help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Printing integers from a userform

If, for instance, the value is entered into a textbox1:

Sheets(2).Range("A1") = CInt(UserForm1.Textbox1.Value)
or
Sheets(2).Range("A1") = CLng(UserForm1.Textbox1.Value)

The conversion function CLng gives a larger limit on the number of digits
that Excel will handle without sending an Overflow message.


"Brad" wrote in message
...
I have a userform on an excel workbook that takes numerical input from a
user
and should paste those values to another workbook. This works fine;
however,
it pastes the numbers as text format instead of number format. How do I
get
the values to be number format not text?

Thanks for any help



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
Printing a UserForm RyanH Excel Programming 1 October 22nd 07 04:03 PM
Userform Printing sparx Excel Discussion (Misc queries) 8 July 31st 06 08:59 AM
Printing from userform Kjeldc Excel Programming 1 April 28th 06 06:13 PM
Userform - Printing Greg B Excel Worksheet Functions 9 September 16th 05 12:11 AM
A list of Consecutive Integers, can I search for missing integers CM Excel Worksheet Functions 4 September 2nd 05 06:38 PM


All times are GMT +1. The time now is 09:05 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"