Desu Nota from Columbus
Well-known Member
- Joined
- Mar 17, 2011
- Messages
- 556
I found a code that forces excel to print entire workbook instead of active pages. Unfortunately I think its syntax is for an earlier version.
Please help me! I have to print hundreds of excel files to PDF; the files I have done already are incomplete because only one sheet in the workbook gets converted. Here is the Macro with the link I am using.
I am using Excel 2003, and VBA 6.5
http://www.mrexcel.com/forum/showthread.php?t=40931
The error code is in bluebelow--- Compile Error! User-Defined type not defined.
Option Explicit
Private Sub App_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
Application.EnableEvents = False
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
Application.EnableEvents = True
Cancel = True
End Sub
-----------------------------------------------------------------------
Option Explicit
Dim AppClass As New EventClass
Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub
Thank you to anyone who can help me.
Please help me! I have to print hundreds of excel files to PDF; the files I have done already are incomplete because only one sheet in the workbook gets converted. Here is the Macro with the link I am using.
I am using Excel 2003, and VBA 6.5
http://www.mrexcel.com/forum/showthread.php?t=40931
The error code is in bluebelow--- Compile Error! User-Defined type not defined.
Option Explicit
Private Sub App_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
Application.EnableEvents = False
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
Application.EnableEvents = True
Cancel = True
End Sub
-----------------------------------------------------------------------
Option Explicit
Dim AppClass As New EventClass
Private Sub Workbook_Open()
Set AppClass.App = Application
End Sub
Thank you to anyone who can help me.