I had previously been printing multiple worksheets from 1 table using the following code
However i have just split the table/List Object into 2 tables on the same worksheet, how can i adapt this VBA to print the first and second table.
VBA Code:
Sub PrintRecipes()
Dim c As Range, LR As Long, lo As ListObject
Set lo = Sheets("****tail Conversion Sheet").ListObjects(1)
With ActiveSheet
On Error Resume Next
.ShowAllData
On Error GoTo 0
.PrintOut
LR = .Cells(Rows.Count, 5).End(3).Row
If Application.CountIf(.Range("E4:E" & LR), ">0") > 0 Then
.Range("B3:G" & LR).AutoFilter 4, ">" & 0
For Each c In .Range("B4:B" & LR).SpecialCells(12)
Sheets(c.Value).PrintOut
Next c
lo.AutoFilter.ShowAllData
End If
End With
Sheets("****tail Conversion Sheet").Select
End Sub
However i have just split the table/List Object into 2 tables on the same worksheet, how can i adapt this VBA to print the first and second table.