Worksheet_SelectionChange Sub Private (ByVal the Target of As the Range)
Dim rows_count of As Integer
Dim rows_id of As Integer
Dim COLUMN_COUNT of As Integer
Dim the column_id of As Integer
COLUMN_COUNT = Selection.Columns.Count 'returns the number of columns selected region
rows_id = ActiveCell.Row' return to the active cell line No.
rows_count = Selection.Rows.Count 'selection area to return the number of rows
column_id = ActiveCell.Column 'return to the active cell's column number
MsgBox rows_count
MsgBox COLUMN_COUNT
MsgBox the column_id
MsgBox rows_id
End Sub