Em có COD sau, nhưng em không được hiểu, mong cả nhà giải thích giúp em với ạ.
Sub In()
Dim str As String
Dim Arr As Variant
With Sheets("Sheet1")
If Cells(11, 6) Then str = str & vbBack & "A"
If Cells(12, 6) Then str = str & vbBack & "B"
If Cells(13, 6) Then str = str & vbBack & "C"
Arr = Split(Mid(str, 2), vbBack)
Sheets(Arr).Select
ActiveWindow.SelectedSheets.PrintPreview
'Sheets("A").PrintOut
'Sheets("B").PrintOut
'Sheets("C").PrintOut
End With
End Sub
Sub In()
Dim str As String
Dim Arr As Variant
With Sheets("Sheet1")
If Cells(11, 6) Then str = str & vbBack & "A"
If Cells(12, 6) Then str = str & vbBack & "B"
If Cells(13, 6) Then str = str & vbBack & "C"
Arr = Split(Mid(str, 2), vbBack)
Sheets(Arr).Select
ActiveWindow.SelectedSheets.PrintPreview
'Sheets("A").PrintOut
'Sheets("B").PrintOut
'Sheets("C").PrintOut
End With
End Sub