Bug Rep: Excel 2007 .xlsm file not saving commented codes

O

orbii

since i've tested this agaist 2 different copies of Excel 2007 fresh install
on different machines at home, i think it's clearly a bug.

ok, in order to save vba codes now in excel 2007, i'd have to save files in
the .xlsm format. that's cool. everything been working sweet, until...
spent 4 long days busting my butt during the new year, missed all the nice
parties to rush this stupid project out, and 2 hours being scream at by my
boss over skype kinda ate my heart out.

how can such a simple mistake be made? very very easy >:Errrrrrrr

go on any sheet that has codes in your ms vb window and just comment
everything, then save the file - and make sure its a .xlsm file. then
reopen it. and WALAH, ALL GONE!!!!!!!!!!

to avoid it, have a small small code on the top that is a sub, or private
sub, and option explicit doesn't cut it either. hope no one else has to
suffer like i did.

aloha, orbii

ps: pls submit for me an official bug report.
 
H

Harlan Grove

orbii wrote...
....
go on any sheet that has codes in your ms vb window and just comment
everything, then save the file - and make sure its a .xlsm file. then
reopen it. and WALAH, ALL GONE!!!!!!!!!!
....

This is a peer-to-peer newsgroup, so not a direct line to MSFT.

Too late to help this time, but always export nontrivial VBA modules to
text files as backups. Always do active development on COPIES of the
last-known-good file. Finally, don't trust any software vendor (even -
especially? - MSFT) to get an upgrade with so many new features right
enough before the second service pack.
 
O

orbii

Harlan Grove said:
orbii wrote...
...
...

This is a peer-to-peer newsgroup, so not a direct line to MSFT.

Too late to help this time, but always export nontrivial VBA modules to
text files as backups. Always do active development on COPIES of the
last-known-good file. Finally, don't trust any software vendor (even -
especially? - MSFT) to get an upgrade with so many new features right
enough before the second service pack.

i just want to cry T.T... but i got what cha saying. was such a rush job,
so last min... reminds me of that movie duplex. sigh...
 
N

Nick Hodge

Orbii

Checked this out and there was quite a discussion about how this should be
handled during the early beta cycle. The 'feature' decided upon is that if
an xlsm has no code (Commented code is not code) the workbook needs to be
'marked' as safe and in doing so the commented code is deleted.

The general opinion is that it is still a bug, but certainly a bug reported
early in the process by Stephen Bullen was marked as 'closed' with a comment
of 'by design'

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
O

orbii

aaah, if that was the case, i can then see why that would be. thank you
very much Nick.

aloha, orbii
 
H

Harlan Grove

Nick Hodge wrote...
....
Checked this out and there was quite a discussion about how this should be
handled during the early beta cycle. The 'feature' decided upon is that if
an xlsm has no code (Commented code is not code) the workbook needs to be
'marked' as safe and in doing so the commented code is deleted.

The general opinion is that it is still a bug, but certainly a bug reported
early in the process by Stephen Bullen was marked as 'closed' with a comment
of 'by design'
....

Not that anything will change, but 'by design' in this case seems to
mean 'too lazy even to think this through much less change it'.

What differences are there between XLSX and XLSM files other than the
possible presence of VBA modules in the latter? If that's the only
difference, what's the benefit of 'marking' XLSM files lacking VBA
modules as safe rather than suggesting the user save the file in XLSX
format? Isn't the whole point of distinguishing XLSM from XLSX files
pointing out that XLSM files may be unsafe? Then again, if there are
multiple VBA modules, some with code and others without code, are all
modules saved or only the ones with code? If only the ones with code,
that's definitely a bug since the presence of the other modules in the
saved file would mean the file must be marked unsafe.

I believe I recall this was debated in David Gainer's blog. From my
perspective, while there might be some tenuous rationale for omitting
no-code VBA modules from saved XLSM files, there's no justification for
not displaying dialogs prompting users to save no-code modules as text
files, the same dialog that would appear if the user tried to remove
the module.

Methinks there's some unspoken reason involving SharePoint and/or
managed code to explain this 'design decision'.
 
N

Nick Hodge

Harlan

As you may suspect, you'll not find many disagreeing that it should at least
warn. Your SharePoint idea may be a reason (or something similar). I suspect
it was more 'we'll look at this later' ;-)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
H

Harlan Grove

Nick Hodge wrote...
As you may suspect, you'll not find many disagreeing that it should at least
warn. Your SharePoint idea may be a reason (or something similar). I suspect
it was more 'we'll look at this later' ;-)
....

Like it only took Microsoft 20 years to raise the number of nested
function calls or a mere 9 years to provide colored worksheet tabs in
Excel 2002 from when Quattro Pro 5 had them.

Won't hold my breath waiting for this to change.
 

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