bob1122
09-02-2008, 08:41 AM
I want to include the count of the number of columns in a worksheet, where the number of columns may change, in a macro.
In Excel the following returns the correct column count:
= CountA($1:$1)
In a macro, the following returns a result of "1" instead of the correct column count:
colkount=WorksheetFunction.CountA("$1:$1)"
How can I get the correct column in a macro? thanks
In Excel the following returns the correct column count:
= CountA($1:$1)
In a macro, the following returns a result of "1" instead of the correct column count:
colkount=WorksheetFunction.CountA("$1:$1)"
How can I get the correct column in a macro? thanks