eHow launches Android app: Get the best of eHow on the go.

How To

How to Convert an Integer to a String in Visual Basic

Contributor
By Jackson Lewis
eHow Contributing Writer
(0 Ratings)

Visual Basic (VB) is Microsoft's event-driven programming language designed for the COM programming model environment. It is designed to be easy to use and was based on the programming model used for the BASIC programming language. Visual Basic allows the programmer to create User Interfaces without complex programming from using predefined software components. A common task for the Visual Basic programmer is converting from an Integer to the String data type. By permitting easy conversions to and from the String data type, the Visual Basic programmer can use data interchangeably with User Interfaces.

Difficulty: Moderate
Instructions
  1. Step 1

    Open a new Visual Basic program in your software development environment.

  2. Step 2

    Declare a variable of the Integer data type and assign a value to it by typing the following code in the Visual Basic program:
    Dim myVariable As Integer
    myVariable = 777

  3. Step 3

    Use the CStr function to convert the Integer variable to a string by typing the following code in your program:
    Print CStr(myVariable)

  4. Step 4

    Compile and run your Visual Basic program and it will output "777" to the screen.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2010 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics