I've used VB exactly once, but I presume there will be suitable language features for this.
You'd write a function that looked at each character of the string individually - I presume there would be either array access to the string, or an equivalent to a .charAt(n) function for this purpose.
A simple way would be to look at the character code for the string (e.g. a=97, A=65), and based on its range, do some simple maths on it. This, however, unless the function gets complicated, won't do accents.
A sneaky trick would be to create two copies of the string, and uppercase one, and a lowercase one. Then, you could run through the string, compare each character to the equivalent in the two copies, and then use the different one.