The Visual Basic for Microsoft .NET -- or VB.NET -- framework programming language has a variety of built-in functions for string processing. The VB.NET string functions return the results in the form of a number, such as the length of a string and a character position within the string function or a string. The CHR string function allows software developers to add escape, delete and tab control characters to a string by using their ASCII code. You need to use ASCII code 9 to add a tab to a string in VB.NET.
Launch the Microsoft Visual Basic software. Open the VB.NET program in which you want to add a tab into a string.
Add the following code after the "public STRING" line in your VB.NET program:
TextBox.Text = "State" + CHR(9) + "Capitol"
This separates the "State" and "Capitol" variables with the "Tab" control character.
Click the Save button to save the amended VB.NET program.
Tips & Warnings
- The ASCII values are the Windows default. However, values in the ANSI character set above 127 are determined by the code page specific to different operating systems.
How to Check for a Tab Character in VBA
How to Check for a Tab Character in VBA. ... How to Add a Tab Into a String on VB.NET. The Visual...
How to Highlight Text in a Text Box in VB.NET
If you create VB.NET programs, you probably work with text box controls. ... This code selects the text in the text box...
How to Insert Tabs Into Strings in Java
The Java programming language requires the escape character to insert a tab value within a string. The tab character automatically inserts several...
How to Use Tabs in Visual Basic
How to Use Tabs in Visual Basic. Visual Basic tabs serve four different functions. ... column2, column3 As String. column1 = "First...
How to Convert Tab Delimited Files to XLS
How to Convert Tab Delimited Files to XLS. ... How to Convert Excel to Text of ASCII. Choose "Formatted Text," "Tab Delimited"...