ChuckDrago
Active Member
- Joined
- Sep 7, 2007
- Messages
- 470
- Office Version
- 2010
- Platform
- 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)
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)