Can anyone hlp me with the coding for the two events below? Thanks.
Reverse Text
· Write code to reverse the text a user enters in "txtEntry1" when the user clicks the button "cmdReverseText". Display the result in the label "lblResult". For example, an entry of :
"Hello World!"
would cause the following text to appear in the label "lblResult" when the user presses the button "cmdReverseText".
"!dlroW olleH"
· Clear the result display.
· Remove leading and trailing spaces from the text before reversing it.
· Check that the user has entered at least one character.
· Save the project.
· Run several tests.
Count Occurrences
· Write code to count the occurrences of "txtEntry2" in "txtEntry1" when the user clicks the button "cmdCount". Display the result in the label "lblResult". For example, entries of
"This is some text this is" and "is"
would cause the following text to appear in the label "lblResult" when the user presses the button "cmdCount".
"Occurrences Found : 4"
· Clear the result display.
· The count should NOT be case-sensitive.
· Remove leading spaces from the text before reversing it.
· Check that the user has entered at least one character in both text boxes.
· Save the project.
· Run several tests.
Hints:
use Mid and Instr functions among others