![]() |
|
#2
|
||||
|
||||
|
For a basic report, you could use code like:
Code:
Dim lRow As Long, bEmpty As Boolean
lRow = ThisWorkbook.ActiveSheet.UsedRange.Cells.SpecialCells(xlCellTypeLastCell).Row
bEmpty = True
With Selection
If .Rows(1).Row < lRow Then
If ThisWorkbook.ActiveSheet.Range("A" & .Rows(1).Row & ":B" & .Rows(.Rows.Count).Row).SpecialCells(xlCellTypeBlanks).Count _
< .Rows.Count * 2 Then bEmpty = False
End If
If bEmpty = True Then
MsgBox "All rows in columns A & B in the selected rows are empty."
Else
MsgBox "At least one row in columns A & B iin the selected rows is not empty."
End If
End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] Last edited by macropod; 07-05-2015 at 01:13 AM. Reason: Enhanced code |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Check boxes that insert data from Excel
|
spc94 | Word VBA | 1 | 06-22-2015 01:46 PM |
| Multiple Check In/check Out Times | big0 | Excel | 4 | 09-19-2013 05:02 AM |
cannot check/uncheck check box but added check box
|
learn2office | Word | 1 | 11-27-2012 02:02 AM |
| Link word check box to access check box | Mrkieth | Word | 4 | 01-30-2012 06:43 AM |
| Need Help with Using a Check Box | Nick9589 | Excel | 1 | 05-01-2010 09:29 AM |