Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check if Active Workbook is Empty
Excel 2003 with Visual Basic 6.3 I'm sure there must be a way to check and see if the Active Workbook is empty. Any clues? -- scantor145 ------------------------------------------------------------------------ scantor145's Profile: http://www.excelforum.com/member.php...o&userid=14766 View this thread: http://www.excelforum.com/showthread...hreadid=390186 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check if Active Workbook is Empty
What is your definition of empy?
Possibly Dim bEmpty as Boolean, sh as Worksheet bEmpty = True for each sh in Activeworkbook.Worksheets if Application.CountA(sh.UsedRange) < 0 then bEmpty = False Exit for end if Next With ActiveWorkbook if .Worksheets.count < .Sheets.count then _ bEmpty = False End With if bEmpty then msgbox Activeworkbook.Name & " is empty" end if The above doesn't check for shapes/olebojects or code. -- Regards, Tom Ogilvy "scantor145" wrote in message ... Excel 2003 with Visual Basic 6.3 I'm sure there must be a way to check and see if the Active Workbook is empty. Any clues? -- scantor145 ------------------------------------------------------------------------ scantor145's Profile: http://www.excelforum.com/member.php...o&userid=14766 View this thread: http://www.excelforum.com/showthread...hreadid=390186 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to know the active column is empty ? | Excel Discussion (Misc queries) | |||
Can I keep "Windows of active workbook check box" checked | Excel Discussion (Misc queries) | |||
macro- move down to empty cell & active worksheet | Excel Worksheet Functions | |||
Check active sheet not the one with macros | Excel Programming | |||
Code to check for active worksheet | Excel Programming |