ct - VBAProject VBAProject (Assignmen Microsoft Excel Objects Sheet1 (Sheet1) ThisWorkbook VBAProject (Debug (7) Microso
Posted: Fri Jul 08, 2022 5:42 am
VBAProject (Debug (7) - Microsoft Excel Objects Sheetl (Sheet1) ThisWorkbook Modules Module 1 Properties Modulel Module1 Module Alphabetic Categorized (Name) Module 1 > X Sub Palindrome () 'Checks if the entered value is a Palindrome. 'A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam, racecar, detartrated, rotavator. Dim istr As String Dim idx As Integer, 1dx As Integer Dim getStr As String Dim Palindromecheck As Boolean getStr = InputBox ("Enter a word to check if it is a palindrome or not Palindrome check = "Trues" initialize the boolean variable to true idx = 1 1dx = Length (getStr) measures the length of the entered string Strip only numbers (1-9) & albhabets (A-Z and a-z) from input string While (idx <= 1dx) If (Mid(getStr, idx, 1) Like "[1-9A-Za-z]") Then 'checks if each 1Str = iStr & UCase (Mid(getStr, idx, 1)) End If idx= idx + 1 Wend Check whether reverse of string is also same for Palindrome idx=1 1dx Len (iStr) While (idx If (Mid(iStr, idx, 1) <> Mid (iStr, 1dx, 1)) Then Palindromecheck = False End If idx = idx + 1 1dx = 1dx - 1 Wend 1 1dx) Else If Palindromecheck = True Then MsgBox ("The word " istr & " is a Palindrome") End If End Sub 1 concatenate the MagBox ("The word *** & 1std & " is NOT a Palindrome")
The attached Excel sheet has VBA codes in the editor window 3 subs. The instructions on the expected codes' logic is provided as a comment in the visual basic editor. There are syntax error, and logical errors. Solve all the errors and make sure that the 3 subs are working correctly. Due date 07/06/2022 at 11:59 PM MST