No imprime porque en el código pusiste esto:
Private Sub ListBox1_Click()
Y debes poner esto
Private Sub CommandButton1_Click()
Te anexo el código para imprimir, imprimir y pdf o pdf:
Private Sub CommandButton1_Click()
Call Impresion(1)
End Sub
Private Sub CommandButton2_Click()
Call Impresion(2)
End Sub
Private Sub CommandButton3_Click()
Call Impresion(3)
End Sub
'
Sub Impresion(tipo)
'Por.Dante Amor
ruta = ThisWorkbook.Path & "\"
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
h = ListBox1.List(i)
If tipo = 1 Or tipo = 2 Then
Sheets(h).PrintOut Copies:=1, Collate:=True
End If
If tipo = 2 Or tipo = 3 Then
Sheets(h).ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=ruta & Sheets(h).Name & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
End If
Next
End Sub
'
Private Sub UserForm_Activate()
'Por.Dante Amor
ListBox1.MultiSelect = 1
ListBox1.ListStyle = 1
For Each h In Sheets
ListBox1.AddItem h.Name
Next
End Sub
.
Te envié el archivo para que realices pruebas.
.
'S aludos. Dante Amor. Recuerda cambiar la valoración a la respuesta. G racias
.