you can use uppercase(text) or lowercase(text) to convert the text to be upper or lower as required.
if you need to know before you take any action, you could compare two values like this:
if TextBox.Text = uppercase(TextBox.Text) then you know it was already all upper case
or
if TextBox.Text = lowercase(TextBox.Text) then you know it was already all lower case...