In Visual Basic 6, there are two important functions to change a string to uppercase or lowercase. In this example, you will build a small application that takes a string and returns uppercase or lowercase version depending on user choice.
Program Code: UCase () and LCase()
First look at the code for first button – UpperCase
.
Private Sub Command1_Click()
Text2.Text = UCase(Text1.Text)
End Sub
Now code for button – LowerCase
.
Private Sub Command2_Click()
Text2.Text = LCase(Text1.Text)
End Sub