VBA: Count the Number of Used Columns
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
Leave a comment
| Trackback

