by Rajesh Sivaraman(Palakkad) (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 24th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form because 'i have use the lostfocus and it wont
'like firstname middlename lastname etc.
'And if you give multiple spaces in between the two names it will be outputted as it is.
'
'If you cannot follow the code pls feel free to contact me.
'Because i'm in a hurry so i have not given the documentation.
'Rajesh Sivaraman.
Dim firstname, lastname As String
Dim bool As Boolean
Private Sub Form_Load()
bool = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If bool = False Then
If KeyAscii = 32 Then
firstname = Text1.Text
bool = True
End If
Else
lastname = lastname & Chr(KeyAscii)
End If
End Sub
Private Sub Text1_LostFocus()
Text1.Text = lastname & " " & firstname
End Sub
No comments have been posted about 'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec. Why not be the first to post a comment about 'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec.