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
How do I count Columns on a Sheet
-
- Posts: 3
- Joined: Tue May 17, 2005 9:54 am
- Location: Farnborough, UK
- Contact:
Re: How do I count Columns on a Sheet
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.
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.
Lars Arvidsson, Axolot Data
-
- Posts: 3
- Joined: Tue May 17, 2005 9:54 am
- Location: Farnborough, UK
- Contact:
Re: How do I count Columns on a Sheet
Thanks, will give that a go!