Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Class Assignment for April 9: (Finish and Post by Monday before class).Write a p

ID: 3703238 • Letter: C

Question

Class Assignment for April 9: (Finish and Post by Monday before class).Write a program that asks the user for their first and last name and then shows the following in message boxes Whole Name First Name Length of first name Last Name Length of last name V2.5 Manipulating Strings with VBA Functions TABLE 2.3 VBA STRING FUNCTIONs Function NameReturns Str0 Val0 Trim0 Left0 Right) Mld0 InStr0 A string representation of a number A numerical representation of a string A string with leading and trailing spaces ramoved A portion of astring beginning from the left side A portion of a string beginning from the right side Any portion of a string A number representing the place value of aparticular character within astring The position of an occurrence of one string withinanother. from the end of the string A string with its character order reversed The number of characters in a string A string with all characters lowercas A string with all characters upparcase A string converted to one of several possible formats A number Indicating the result of a string comparison Number representing tha ANSI code of a character One character string representing the ANSI code of anumber Uppercase All Lowercase Reversed StrReversel UCas0 AscO Bonuscan you have the message box show something else besides OK? Windows Photo Viewer Open ENGS 116 Introduction to table 102 Bul-in constants for usewith the buton argument of the Nsglos function Display Waming Mewage lcon 256 12 768 Option Explicit Sub samplemessage) Dim continueQuestion As String continueQuestion MagBox(Do you want to continue?", vbYesNo vbQuestion, Example) End Sub Do you want to continue?

Explanation / Answer

Private Sub Command1_Click()
Dim fname As String,lname As String

fname=Textbox1.Text;
lname=Textbox2.Text;

display = fname & lname
MsgBox "Whole Name" & display
MsgBox "First Name" & fname
MsgBox "Length of first name" & len(fname)
MsgBox "Last Name" & lname
MsgBox "Length of last name" & len(lname)
MsgBox "In UpperCase" & UCase(display)
MsgBox "In LowerCase" & Lcase(display)
MsgBox "Reverse String" & StrReverse(display)

End Sub