Page 1 of 1

How do I count Columns on a Sheet

Posted: Wed Mar 23, 2016 9:19 am
by indigomage
How do I count the number of columns on a Sheet?

I can get the count of the number of sheets, but how do I get this for Columns
I tried LastCol, but that always returns 0.


regards

Ian

Re: How do I count Columns on a Sheet

Posted: Wed Mar 23, 2016 11:11 am
by larsa
Hello

Use XLS[Sheet].CalcDimensions before you use LastCol (or FirstRow,FirstCol,FirstRow).

CalcDimensions is not called automatically because it takes some time to calculate it.

Re: How do I count Columns on a Sheet

Posted: Wed Mar 23, 2016 11:15 am
by indigomage
Thanks, will give that a go!