Mac Excel crashing on Startup with a PC created Workbook

R

RiTz21

Help.

I have a workbook which functions very well on excel 2000, 2002 and
2003.
[http://theonlysheet.com/downloads/DnD3.5MCS-V7.30.zip]

Yet, it is having problems on Mac Excel: Specifically, if you load it,
it works: But if you save the workbook back to hard disk and try to
re-load it, Mac Excel crashes.

It seems that when Mac Excel saves the Workbook, it breaks it. Why is
that ???

I have tried deleting All VBA modules and recreating them to make sure
there are no currupted modules (There are NO forms in the workbook).

ANY Ideas? This Fails on all the Macs the people have (many version I'm
told)

If you start the Workbook (the original or the saved one) by Disabling
the Macro, it will not fail (although it will be un-usable - Macros are
essential)

Weirdly enough, this message pops up: "This workbook contains a type of
Macro (microsoft Excel Version 4.0 macro) that cannot be disabled.
There may be viruses in these Macros."

I have no idea what that is - The workbook is developped on Windows,
with Excel 2003 !! If anything, I had to 'downgrade' many VBA functions
to support the Older Max Excel!!

ANY help would be greatly appreciated!!

Thanks & Happy New Year!
Richard
 
B

Bernard Rey

It's difficult to say anything about it: the macro project being locked,
there's no way to find out what's going on on startup.

Oddities:

- If opened and saved as... in Excel 2004, the duplicated workbook opens in
Excel:2001 (last OS 9 version, rather close to Excel 97) - but crashes Excel
2004 as you already know

- If opened and saved as... in Excel:2001, the duplicated workbook opens in
Excel 2004 and even shows the "Mac version" warning (which I didn't see when
opening the original workbook in Excel 2004) - but will crash Excel:2001
when attempting to open it again.

Well, *something* in the opening macro process seems to be modified when the
workbook is saved. As I have no idea in what is going on at that point, I'm
afraid I can't be of much more help...


---------------------------------------------------------
Please reply to the newsgroup, and within the same thread.
Merci de répondre au groupe, et dans l'enfilade.

--
Bernard Rey - Toulouse / France
MVP - office:macintosh http://faq.office.macintosh.free.fr




RiTz21 :
 
J

JE McGimpsey

RiTz21 said:
ANY Ideas? This Fails on all the Macs the people have (many version I'm
told)

If you start the Workbook (the original or the saved one) by Disabling
the Macro, it will not fail (although it will be un-usable - Macros are
essential)

Weirdly enough, this message pops up: "This workbook contains a type of
Macro (microsoft Excel Version 4.0 macro) that cannot be disabled.
There may be viruses in these Macros."

I have no idea what that is - The workbook is developped on Windows,
with Excel 2003 !! If anything, I had to 'downgrade' many VBA functions
to support the Older Max Excel!!

This appears to me to be a timing issue. If I open the workbook, save
it, quit XL, then double-click on the file, XL crashes.

However, if i open XL first, then open the saved file (using File/Open),
the saved file opens fine.

I don't see anything in either the Workbook_Open or the other macros
that would cause a problem. I don't know if the large number of defined
names is a factor or not.

I'll experiment a bit, but this is probably something that MacBU will
need to look at - I'm sending them a note separately.
 
T

tonedeafdave

I have been having a similar problem - still not totally resolved.

The 'macro can't be disabled' issue is a red herring (or was in my
case). If you hit the key with the apple on it (I'm new to Macs) and
F11 you get a new macro sheet added. I keep doing it by mistake as I am
not used to the keyboard. Delete all such and the message goes away.

In my example, some at least of the crashes seem to be due to
Mac:Excel's attempt to load a previously crashed file as well as the
one you are trying to run. Try opening with macros disabled, then
looking in the 'Window' menu to see if you have a second workbook open
(a saved version of the crashed book). If you can close this without
saving, you can usually use your file again.

This does not solve the problem of the original crash - if you get
that, I'd like to know.
 
R

RiTz21

This is the Content of the Workbook_Open() for that version...
Basically, I just cound all the named cells that start with "t_Sel_"

THANKS for any help you can provide !!!

Richard

Private Sub Workbook_Open()
' Passe la liste des noms et note les tSels
i_tSel = 0
For i = 1 To Names.Count
If Names(i).Name Like "tSel_*" Then
i_tSel = i_tSel + 1
End If

If InStr(Names(i).RefersTo, "#") > 0 Then
MsgBox "Invalid Named Cell detected: " & Names(i).Name
End If
Next

' Init
bEnableControlActivate = True

#If Mac Then
ActiveWorkbook.Names("IsMac").RefersToRange = True
MsgBox "Note that the Macintosh version of Excel does not fully
support this Sheet." _
& "This is currently under investigation"
#Else
ChDir (ActiveWorkbook.path)
ActiveWorkbook.Names("IsMac").RefersToRange = False
#End If

End Sub
 
J

JE McGimpsey

RiTz21 said:
This is the Content of the Workbook_Open() for that version...
Basically, I just cound all the named cells that start with "t_Sel_"

THANKS for any help you can provide !!!

Yeah, I saw that - it shouldn't pose any problem that I can think of,
nor do any of your regular macros look like they're a problem. It's
possible that the file's corrupt. The first thing I'd do is transfer all
the macros over to new modules - if you don't have access to Windows XL
and Rob Bovey's Code Cleaner. PITA, but I do that with every application
just before shipping. Out of superstition, I don't copy the last line of
the module, but enter it by hand when I paste the code into the new one,
just in case there's something flakey about the last character in a
module.
 
R

RiTz21

I tried the Code Cleaner to no avail. I also copies all the Module's
code (except the first/last character which I typed myself) to a text
file, deleted all modules and re-inserted.... with no Luck.

Would it be possible that this issue is caused by the Workbook being
VERY close to the maximum number of Formats !? On the PC, I have an
older version of this workbook which crashes Excel 2003 because of the
number of cell formats, yet excel 2000 can handle it without crashing.

Is there a way to COUNT the Exact number of different cell formats that
a Workbook contains??

Thank you for any help you can provide!

Richard
 

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