This is VBA we are talking about here. Perhaps other programming languages change the value of a variable just by asking for a characteristic of that variable's value but it doesn't happen in VBA.
The value of the variable 'wrd' is not being changed by your line
Select Case Trim(wrd)
If you want to change the value of the text in wrd then you need to tell it to change
eg
wrd = Trim(wrd)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|