Textbox vb

Posted on 2012-09-03
Last Modified: 2012-09-03
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, "")
Question by:Kiwi-123
    LVL 44

    Expert Comment

    by:Martin Liss
    I could not reproduce that behavior. What do you select on the userform before you click the 'Userform' button?
    LVL 26

    Accepted Solution

    Change this line:
    .Offset(, 16).Value = TextBox15

    Open in new window

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

    Open in new window


    Author Closing Comment

    Thanks for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Title # Comments Views Activity
    copying from excel to word 2 27
    Excel add date to text 3 30
    VBA exception error 5 22
    Protecting an object 3 23
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now