UsedRange method to find number of used columns in a worksheet


Sub UsedColumns_UsedRange()

Dim usedColumns As Integer

usedColumns = ActiveSheet.UsedRange.Columns.Count

MsgBox usedColumns

End Sub

Popular posts from this blog

50 Excel VBA Oral Interview Questions