Teller radene i et utvalg - eksempler på VBA -kode

Hvis du noen gang trenger å telle antall rader som ble valgt, bruker du Selection.Rows.Count

Tell rader i et utvalg

12345 Public Sub CountMyRows ()MsgBox Selection.Rows.CountSlutt Sub

Hvis du noen gang trenger å telle antall kolonner som ble valgt, bruker du Selection.Columns.Count

Telle kolonner i et utvalg

12345 Offentlig del CountMyColumns ()MsgBox Selection.Columns.CountSlutt Sub
wave wave wave wave wave