Event Before Save NOT executing

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
470
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone,

I have used (successfully) a pdf conversion macro, triggered by the Before Save event. Since I had another requirement to duplicate this, I just copied the code to the spreadsheet the new user needs to convert to pdf. When trying it, the spreadsheet reacts to the Save button by saving the file as if there was no before save macro, therefore the pdf conversion macro never gets triggered.

Here is the code (working well in one machine and not on the other):

Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = True
Sheets("2nd level Bowler").Select
Call PrintToPDF_Late '<<<This is the conversion routine
End Sub

The difference between spreadsheets: the successful one is a self contained sheet with no links to anywhere. The failing ones has several hyperlinks to other files (could this be the problem?).

Thanks,

Chuck

PS: both users have identical configs, using Excel 2003 running on Windows XP SP3, (network)
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
... (sigh)...
Just because of this, I will cut down to 6 pints my upcoming celebration of St. Pat...
Andrew, it was in a module.... and the worst part is that I KNOW this...
Let it be three pints...
Thank you all,

Chuck
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top