Public Sub colcount()
Cells.Select
MsgBox Selection.Columns.Count
End Sub
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Jack" wrote:
| Hello,
| How many columns spreadsheet has?
| oExcel.ActiveWorkbook.ActiveSheet.Columns.Count returns number 256
| but when I scroll spreadsheet horizontallyI see much more of them.
| Roughly, my count is 27*27 which is equal to 729.
| Why is that discrepancy?
|
|