VBA: Count the Number of Used Columns

September 7th, 2004 | Categories: VBA | Tags:

The following code will return in a message box the total number of columns used in a worksheet. Empty columns are considered used if data follows the empty column.

MsgBox ActiveSheet.UsedRange.Columns.Count
No comments yet.