View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
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