Using Mid Function in VB6/Classic
VB6 Mid function is a string handling function whereby the middle section of a string can be splitted at specific points.
For Example, we have a string "Spaceship" stored in a variable myStr and we will use Mid function to split it.
'--- Variable Declarations
Dim myStr As String
Dim Output as String
myStr = "Spaceship" '--- Store the word Spaceship into myStr
Output = Mid(myStr,3,4) '---Retrieve 4 letters starting from the 3rd letters counting from left
Msgbox(Output) '--- Display a messagebox
The output from the message above will be "aces"
See also Left Function in VB.NET
See also Mid Function in VB.NET
See also Right Function in VB.NET
See also Left Function in VB6/Classic
See also Right Function in VB6/Classic
Subscribe to:
Post Comments (Atom)


0 comments
Post a Comment