Hi all,
i have a workbook containing 2 worksheets. One is called "Transmittal" and the other is called "SAP". The transmittal worksheet is basically a template form that employees use to enter debits and credits. The SAP worksheet is basically a summary or a simple list of the same debits and credit entered in the transmittal worksheet but with some formatting done to them. I want to apply a certain code to be run only on the SAP worksheet upon closing the doc and saving it. I think i got the code right but it applies the formatting to the Transmittal worksheet not the SAP one. please help!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Range("A1:R49").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Sheets("Transmittal").Range("A100:A101"), Unique:=True
End Sub
i have a workbook containing 2 worksheets. One is called "Transmittal" and the other is called "SAP". The transmittal worksheet is basically a template form that employees use to enter debits and credits. The SAP worksheet is basically a summary or a simple list of the same debits and credit entered in the transmittal worksheet but with some formatting done to them. I want to apply a certain code to be run only on the SAP worksheet upon closing the doc and saving it. I think i got the code right but it applies the formatting to the Transmittal worksheet not the SAP one. please help!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Range("A1:R49").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Sheets("Transmittal").Range("A100:A101"), Unique:=True
End Sub