answersLogoWhite

0


Best Answer

A string is a data set in the form of alphanumeric characters and symbols. For example, if you wanted to use a string to concatenate and display a welcome message displaying a user's name, your code would look something like this:

Dim WelcomeMessageString as String = "Welcome to the string demonstration "

Dim FormResponseString as String = form1.text

Message(WelcomeMessageString + FormResponseString)

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Many ways.

1. As a variable.

Dim str as string = "Hello"

msgbox (str)

That would bring up a messagebox with "Hello" on it.

2. As a controll

Add a textbox to your designer, and type this.

msgbox (TextBox1.Text)

That would bring up a messagebox with whatever you type into the textbox on it.

Those are the 2 main ways.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A string is a line of text.

For example:

Dim example As String = "whatever text you want"

Would make a string that says "whatever text you want"

Later, you can use this for a msgbox or textbox

Example:

TextBox1.Text = example '(that is the string we made)

or

MsgBox(example, MsgBoxStyle.Information, "Note!") '(would display a msgbox containing the text in the string)

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use string in visual basic?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What function are used for string length in visual basic?

string length is a function use to check the lenght of a string i.e number of alphabets in a word or sentence.


What is trunicate?

Trunicate is when you trim a string in visual basic


In Visual Basic how do you place a tab into a string with the and sign?

In visual Basic, the tab character has several representations:ChrW(9)vbTabControlChars.TabConvert.ToChar(Keys.Tab)Of these, the last is supported by all .NET languages (including C# where '\t' can also be used).To insert a tab into a Visual Basic string:Dim text As String = "abc"text.Insert (1, vbTab)To insert an ampersand, use the character literal '&':text.Insert (2, '&');


How do you use vbTab in visual basic?

vbTab is treated like a string. It's value is simply the tab character (typically ascii value of 9). You can use it just like any other string variable.


What is the correct coding for converting a string to a double in visual basic 2010?

Dim i as double = CDbl("12")


What is visual basic control?

Visual Basic Controls work on Visual Studio for Visual Basic and Applications that made by Visual Basic.


What is string function visual basic?

A string is a line of text. For example: Dim example As String = "whatever text you want" Would make a string that says "whatever text you want" Later, you can use this for a msgbox or textbox Example: TextBox1.Text = example '(that is the string we made) or MsgBox(example, MsgBoxStyle.Information, "Note!") '(would display a msgbox containing the text in the string)


Why was visual basic made?

Visual basic was made to help ease the development of Windows applications. With it's easy to use language and environment, anyone can learn visual basic in a matter of time.


How do you display a quotation in visual basic?

1. Make a textbox with a " in it. 2. Dim quotation As String = TextBox1.Text 3. To say "Hello" use - MsgBox(quotation & "Hello" & quotation)


What are the parts and use of visual basic 2008?

no comment


What percent programmers use visual basic?

13


You use Visual Basic 6 and you are use to the coding language What is the newest edition with exactly the same coding language?

You said Visual Studio 2010 but does it have the BASIC language.