Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Excel - To test for a Blank Sheet

Please show the VBA coding required in order to test for a blank
worksheet as well as a blank chart-sheet.
Regards.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Excel - To test for a Blank Sheet

If WorksheetFunction.CountA(Sheet1.Cells) = 0 Then MsgBox "Worksheet is
blank."

Don't know much about charts ... <g

--

Vasant


"TKT-Tang" wrote in message
om...
Please show the VBA coding required in order to test for a blank
worksheet as well as a blank chart-sheet.
Regards.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel - To test for a Blank Sheet

One needs to define blank. There can be shapes on the sheet and no cell
entries.

--
Regards,
Tom Ogilvy

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
If WorksheetFunction.CountA(Sheet1.Cells) = 0 Then MsgBox "Worksheet is
blank."

Don't know much about charts ... <g

--

Vasant


"TKT-Tang" wrote in message
om...
Please show the VBA coding required in order to test for a blank
worksheet as well as a blank chart-sheet.
Regards.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Excel - To test for a Blank Sheet

Good point, Tom ... never even thought of that!

Regards,

Vasant.


"Tom Ogilvy" wrote in message
...
One needs to define blank. There can be shapes on the sheet and no cell
entries.

--
Regards,
Tom Ogilvy

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
If WorksheetFunction.CountA(Sheet1.Cells) = 0 Then MsgBox "Worksheet is
blank."

Don't know much about charts ... <g

--

Vasant


"TKT-Tang" wrote in message
om...
Please show the VBA coding required in order to test for a blank
worksheet as well as a blank chart-sheet.
Regards.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Excel - To test for a Blank Sheet

Mr. Vasant Nanavati and Mr. Tom Ogilvy,

Thank you for your illumination.
A blank worksheet (for my purpose) is primarily devoid of cell entries
; otherwise, there would be required to test for Shapes and Charts
Collections. By extension, there could be (resident already) VBA
Coding and UserForms as well.

How are the items as given detectable by VBA Coding ?

Regards.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel - To test for a Blank Sheet

activesheet.shapes.count = 0

Chartobjects are also shapes.

for code, see
http://www.cpearson.com/excel/vbe.htm

there are no userforms in sheets.

--
Regards,
Tom Ogilvy

"TKT-Tang" wrote in message
om...
Mr. Vasant Nanavati and Mr. Tom Ogilvy,

Thank you for your illumination.
A blank worksheet (for my purpose) is primarily devoid of cell entries
; otherwise, there would be required to test for Shapes and Charts
Collections. By extension, there could be (resident already) VBA
Coding and UserForms as well.

How are the items as given detectable by VBA Coding ?

Regards.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logical Test for blank and then for score Mikesnhu Excel Worksheet Functions 1 May 1st 10 12:02 AM
A logical test in the If function for blank, i.e., If blank? egii Excel Worksheet Functions 5 September 16th 09 11:46 AM
Excel blank sheet opening but the sheet has data DeeMocz8 Excel Discussion (Misc queries) 0 March 11th 09 06:43 PM
Conditional formatting to test blank text cell Andyjim Excel Worksheet Functions 4 January 10th 08 08:45 PM
test for not blank, use value in cell and set as variable Robert Excel Discussion (Misc queries) 0 March 24th 05 11:25 PM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"