Invalid Qualifier

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

For Each C In myRng
With C
S = CStr(C.Value)
S = UCase(WorksheetFunction.Clean _
(WorksheetFunction.Trim(S)))
C = S.Value '*
.WrapText = True
.Rows.AutoFit
End With
Next C

S is Dimmed as a String.
On the marked line (*) I'm getting an Invalid Qualifier error message.

Why please?

Regards.
 
That worked, many thanks.

now, if I could just find how to achieve the same,
but without converting to upper case.

Regards.
 
Converting to Uppercase isn't doing anything in the code you show, so remove
the Ucase() from your code if that is what you are wishing for. Certainly
Clean and Trim don't depend on it and as written, they have completed their
work before anything is changed to uppercase.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top