You actually seem to have two problems here.
#1.. the error you're getting: "Ambiguous name detected"
means that somehow, you have TWO macros with the same name.
Do a "find" (ctrl-f) and search for "beforeclose" and see what you find.
#2.. this one is more of a problem.
The EVIL people of this world have long ago discovered that one method
of introducing a virus on an unsuspecting world is to write a installation
macro cleverly hiding in an Excel file. By setting it to execute during
the Auto_Open macro or a Workbook_Open macro, then hiding it or even
removing it when it is complete. Some of these macros aren't caught
by virus scanners because they THEMSELVES aren't a virus, but what they
can DO is connect and download the virus.
Because of this, the Microsoft Empire has expended considerable resources
to enable users to receive warning when they are about to open a file that
contains macros. If it were as simple as including one line of code to
FORCE the macros to run, then the EVIL people of this world would be sure
to find this secret method of bypassing the protection.
Here's how I have handled it:
I "lock down" the spreadsheet with password protection.
Then, in the Auto_Open or Workbook_Open macro, include the password command
that "unprotects" the workbook. Then, password protect the VBA modules.
In this way, if the user has selected to NOT run the macros, then the workbook
would not be of any use to them. The only way to use it would be to open it
and elect to Enable Macros.
If you need help with this, I might be able to locate my code,
and put together instructions for password protecting the file and VBA modules.