Try something like this:
Option Explicit
Private Sub PtintAllFiles()
Dim WB As Workbook
Dim WS As Worksheet
Dim FileName As String
Dim Path As String
Dim Prompt As String
Dim Title As String
Dim MyResponse As VbMsgBoxResult
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
' Get folder from user
Prompt = "Select the folder with the files that you want to print."
Title = "Folder Selection"
MsgBox Prompt, vbInformation, Title
Application.FileDialog(msoFileDialogFolderPicker).Show
Path = CurDir
'Confirm the procedure before continuing
Prompt = "Are you sure that you want to print all the files in the folder:" & _
vbCrLf & Path & " ?"
Title = "Confirm Procedure"
MyResponse = MsgBox(Prompt, vbQuestion + vbYesNo, Title)
If MyResponse = vbNo Then GoTo Canceled:
'Print all Excel files in the specified directory
FileName = Dir(Path & "\*.xls", vbNormal)
Do Until FileName = ""
Workbooks.Open Path & "\" & FileName
Set WB = ActiveWorkbook
For Each WS In WB.Worksheets
WS.PrintOut
Next
WB.Close
FileName = Dir()
Loop
Canceled:
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub