- Home
·
- String Manipulation
·
- 'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec
'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec
'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
Rate 'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec
(1(1 Vote))
'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
'Name Flipper 'It flips the firstname and lastname 'Please put atleast two controls on the form bec Comments
No comments yet — be the first to post one!
Post a Comment