Excel 2007

D

DanR

When I test ran xl2007 some time ago, I thought that I could live with the
changes & get used to looking in new places to find common tools.
I tried demonstrating my 'in developement' VBA code using Excel 2007 to a
colleague & was thorourghly embarrassed because it failed so miserably.
Among other things, the code duplicates a hidden Sheet: xl2007 copies the
incorrect sheet & destroys the data. It took me a while to understand what
was actually happening. I was shocked when it finally dawned on me that 'any
company' would actually release a product that has this 'data destroyer'
built in. There is no workaround for lost data!

When will xl2007 be out of beta test for real and no longer depend on
customer complaints for debugging?
I hope by Fall 2007.

Dan
 
D

DanR

Well, I am happy to admit that this "data destroyer " may be my own
progamming mistake.
The code was interpreting worksheet.count incorrectly. I will retest
tomorrow when I again have access to xl2007.

Dan
 
C

Chip Pearson

Dan,

Be aware of the distinction between Sheets.Count and Worksheets.Count. If
you have only worksheets in the workbook, the values are the same. However,
if you have Chart Sheets (or other types of sheets), the values will be
different. Sheets.Count returns the number of sheets of all types, whereas
Worksheets.Count returns the count of only worksheets. Also, both
Sheets.Count and Worksheets.Count return the number of sheets both hidden
and visible. If you have hidden sheets, the Count may not be what you
expect.

You will likely run into problems if you mix these together, as in something
like

Sheets(Worksheets.Count).Delete

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top