• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 582
  • Last Modified:

Textbox vb

Please can you help with the attached file.

Column R5 comes back with the result "12" when entered on userform1, however I get the error message within the cell; 'Number stored as text', is there a way to change the code so that TextBox15 delivers the data as a number and not as text

TextBox15.Value = Format(.Offset(, 16).Value, "")
help1.xls
0
Kiwi-123
Asked:
Kiwi-123
1 Solution
 
Martin LissRetired ProgrammerCommented:
I could not reproduce that behavior. What do you select on the userform before you click the 'Userform' button?
0
 
MacroShadowCommented:
Change this line:
.Offset(, 16).Value = TextBox15

Open in new window


To this:
.Offset(, 16).Value = CLng(TextBox15)

Open in new window

0
 
Kiwi-123Author Commented:
Thanks for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now