From the look of your code you are attempting a
Bubble Sort[
^]
The first thing to do is to get your string into a character array - you don't strictly speaking
have to do this but it will make the rest of the code easier to read. Something like this:
ReDim chars(strlength - 1) As String
For i = 1 To strlength
chars(i - 1) = Mid$(str, i, 1)
Next
After that, your attempt isn't too far off the mark, except you need to be looking at and swapping the actual characters not the loop counters.
E.g.
If chars(i) > chars(j) Then
TempValue = chars(j)
etc...
As this is obviously homework I'm not going to give you the full code - give it a go yourself with this extra information ... but I'll give you one hint:
For j=0 to strlength-1
...that 0 is incorrect. Check the documentation on the link I gave you to see what it should be.