Printing integers from a userform

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

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
 
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.
 
Back
Top