ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invalid Qualifier (https://www.excelbanter.com/excel-programming/327838-invalid-qualifier.html)

Stuart[_21_]

Invalid Qualifier
 
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.



Don Guillett[_4_]

Invalid Qualifier
 
try it with c.value=s

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
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.





Stuart[_21_]

Invalid Qualifier
 
That worked, many thanks.

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

Regards.

"Don Guillett" wrote in message
...
try it with c.value=s

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
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.







Don Guillett[_4_]

Invalid Qualifier
 
glad to help

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
That worked, many thanks.

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

Regards.

"Don Guillett" wrote in message
...
try it with c.value=s

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
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.









Tom Ogilvy

Invalid Qualifier
 
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.

--
Regards,
Tom Ogilvy

"Stuart" wrote in message
...
That worked, many thanks.

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

Regards.

"Don Guillett" wrote in message
...
try it with c.value=s

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
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.










All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com