lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I wrote a code to ask user to enter first and last name and then the code will msgbox fullname. Now I want to improve the code. I want to msgbox the first letter for the first name then last name. So later I can msgbox the email address.
For example, if user enter John Smith
I want to msgbox --> JSmith
then later I will do
> your email address is JSmith@abc.com
Thank you very much.
I wrote a code to ask user to enter first and last name and then the code will msgbox fullname. Now I want to improve the code. I want to msgbox the first letter for the first name then last name. So later I can msgbox the email address.
For example, if user enter John Smith
I want to msgbox --> JSmith
then later I will do
> your email address is JSmith@abc.com
Thank you very much.
Code:
Sub myname()
Dim first As String
Dim last As String
Dim full As String
first = InputBox("enter first name")
last = InputBox("enter last name")
full = first & " " & last
MsgBox "your full name is >> " & full
End Sub
Last edited: