Mega Code Archive
Categories
/
VisualBasic Script
/
Excel
Returns a count of all cells in a selection
Sub CountAllCells() Dim myCount As Integer myCount = Selection.Count MsgBox "The total number of cell(s) in this selection is : " _ & myCount, vbInformation, "Count Cells" End Sub