Close workbook with VBA Script fail

A

Arnaud

H

I have a pb, I have created an Excel addin an I have put the following code in it
----------
Private Sub Workbook_BeforeClose(Cancel As Boolean
MsgBox ("Try to unload"
Application.ThisWorkbook.Close savechanges:=False 'or me.Clos
End Su
---------
I have name my file unloadtest.xl
if I double clic on this file from explorer, it works ok but if I create a shortcut who launch Excel with my file in parameters, it crashes
On excel 97 it does no crash but the unload of my xla fail
on Excel 2000 it crashe

Any Idea

ThX By Advanc

Arnaud
 

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