Excel VBA Macro To Count No.of All Rows and Columns In a Active Sheet
Sub CountAllRowsCols()
Dim X As Long
Dim Y As Integer
X = ActiveWorkbook.ActiveSheet.Rows.Count
Y = ActiveWorkbook.ActiveSheet.Columns.Count
MsgBox "The Total No.of Rows= " & X & " :: " & "The Total No.of Columns= " & Y
End Sub
Thanks,Tamatam
Sub CountAllRowsCols()
Dim X As Long
Dim Y As Integer
X = ActiveWorkbook.ActiveSheet.Rows.Count
Y = ActiveWorkbook.ActiveSheet.Columns.Count
MsgBox "The Total No.of Rows= " & X & " :: " & "The Total No.of Columns= " & Y
End Sub
Thanks,Tamatam
No comments:
Post a Comment
Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.