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

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions