FYI Excel 2007: Saving a xlsm file with a hidden worksheet activated makes worksheet visible

D

David G.

I have an Excel application that copies data from one file into hidden
worksheets in 2 other files. When I updated to Excel 2007, one of the
hidden worksheets kept appearing after I ran the data copy procedure
and reopened the target file.

The only difference between this reappearing worksheet and the other 9
hidden sheets was the fact that the code left the reappearing
worksheet active. (I set Excel's screenupdating=false while opening
the target files, moving all the data, and then closing/saving the
target files.) In 2003, Excel would not change the worksheet's visible
property, even though the worksheet had been activated while
screenupdating was set to "false".

I added one line of code, which set one of the visible worksheets
active before saving the file. Once again the hidden sheets remain
hidden, all of them.

Hope this is informative.
THANKS!
David G.
 

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