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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
... (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,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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