View Full Version : I need help with coding this function on VBA

05-28-2021, 03:44 AM
Write a Public Function named “Reverse” that returns an array with four items (the output will be a row vector with four items) – (1) reverse string so that the last letter will be the first (for instance “school” => "loohcs"), (2) the length of the string, (3) the number of numeric charters and (4) the number of special characters (non-alphabetic and non-numeric). The user can decidewhetherthefirstletterofthereversestringwillbecapitalornot.The function should take two arguments: (1) a string to be converted and (2) a (Boolean) parameter that indicates whether the first letter should be capital (true) or not (false). All other letter should not be capital. Please note that it should be programmed as a function and not subroutine!!!

05-28-2021, 10:17 AM

for i = Len() to 1 step -1
and the Mid function