Hi all ,
Pls help me to get multiple Workbooks prints from Single Sheet.
I have problem with below code,
its opens new file , but not printing
and not closing automatically
kindly help me.
code :
Option Explicit
Sub Print_Multiple_Excel_Files_in_Single_Click()
'
' Print_Multiple_Excel_Files_in_Single_Click Macro
'
' Keyboard Shortcut: Ctrl+Shift+P
'
Dim x As Integer
Dim Sheet As Object
Dim Workbook As Workbooks
Dim NumRows As Integer
' Set numrows = number of rows of data.
NumRows = Range("D3", Range("D3").End(xlDown)).Rows.Count
Range("D3").Select
' Establish "For" loop to loop "numrows" number of times.
For x = 1 To NumRows
Sheets("Sheet1").Select
Range("D1").Activate
Range("D1") = ActiveCell.Offset(1 + x, 0)
Workbooks.Open (Range("D1"))
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
ActiveWorkbook.Close
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Next
Sheets("Sheet1").Select
Range("D1").Activate
End Sub
Bookmarks