by Sundeep Khullar (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 9th October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code breaks the string & manipulate it inversely. For example Typing the string in text Field1 "Sandeep=Khullar" will show u the result
API Declarations
Requires two text Fields & One Command Button
If Len(Trim(Text1.Text)) <> 0 Then
pos = Mid(Text1.Text, 1, InStr(1, Text1.Text, "="))
pos1 = Mid(Text1.Text, InStr(1, Text1.Text, "=") + 1)
aas = Left(pos, InStr(1, pos, "=") - 1)
sa = Right(pos, 1)
Text2.Visible = True
Text1.Visible = False
Text2.Text = pos1 + sa + aas
Text2.BackColor = vbButtonFace
Else
MsgBox "Cannot leave text Field Emoty"
Text1.SetFocus
End If
Exit Sub
End Sub
Private Sub Command2_Click()
Form_Load
End Sub
Private Sub Form_Load()
Text1.Visible = True
Text1.Text = ""
Text2.Text = ""
Text1.TabIndex = 0
Text2.TabStop = False
Text2.BackColor = vbButtonFace
Text2.Visible = False
End Sub
No comments have been posted about This code breaks the string & manipulate it inversely. For example Typing the string in text Field1. Why not be the first to post a comment about This code breaks the string & manipulate it inversely. For example Typing the string in text Field1.