+ Reply to Thread
Results 1 to 6 of 6

Using string and integers in textbox

  1. #1
    Registered User
    Join Date
    07-03-2017
    Location
    SC
    MS-Off Ver
    2016
    Posts
    27

    Using string and integers in textbox

    I want to input information from cells to fill a textbox, some of the cells are text (string) and some are numerical (between 50 and 145), the numbers and text change based on different scores. How can I write a string "This person scored a ____" in a text box? String is working but I am not sure of the method to input string then integer and how to write that code.

    Thank you!

    P.S. I am really new at this so if this is a super easy fix I apologize.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Using string and integers in textbox

    Please Login or Register  to view this content.
    Adapt the above to meet your specifics
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Using string and integers in textbox

    Hi Jenna,
    if you have the string "This person scored a " in cell A1 and the number 99 in cell B1, then you could fill a textbox like this:
    Please Login or Register  to view this content.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  4. #4
    Registered User
    Join Date
    07-03-2017
    Location
    SC
    MS-Off Ver
    2016
    Posts
    27

    Re: Using string and integers in textbox

    Thank you, is there a way to write this so that I can have multiple s and i's? For instance:
    s= The score of the test is
    i=74
    s=and the percentile is
    i=9

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Using string and integers in textbox

    You will need to set up different variables for the second set of data using the same concept. Perhaps variable t and j

  6. #6
    Registered User
    Join Date
    07-03-2017
    Location
    SC
    MS-Off Ver
    2016
    Posts
    27
    Perfect, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Textbox to accept integers or decimal numbers only
    By Bob@Sun in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2017, 03:51 AM
  2. TextBox that only accepts integers
    By Chaba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-24-2014, 12:43 PM
  3. Modify userform textbox data validation to include text instead of just integers
    By karmadog62 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 04:58 PM
  4. Modify userform textbox data validation to include text instead of just integers
    By karmadog62 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2014, 02:27 PM
  5. Modify userform textbox data validation to include text instead of just integers
    By karmadog62 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-23-2014, 12:06 PM
  6. Sum integers in string
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2012, 09:17 AM
  7. [SOLVED] TextBox that only accepts integers?
    By Claud Balls in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1