VB code to clear the text box
You can clear the text box by settingTextBox.Text = ""content.
The following demonstrates this method
(1) Create a new VB project
(2) Arrange a TextBox and a Button on Form1
(3) Form code
Option Explicit Private Sub Command1_Click() Text1.Text = "" End Sub Private Sub Form_Load() '设置Text1 Text1.Text = "" '允许显示多行 Text1.MultiLine = True '显示垂直滚动条 Text1.ScrollBars = 2 End Sub
(4) Running effect
Enter text
Click the button delete
The above is the detailed content of VB code to clear text box. For more information, please follow other related articles on the PHP Chinese website!