In your code there are two email sending code first one is for Sheet1 or Sheet2 and second is for Sheet9 or Sheet2 so what email sending code you want me to check.
Or check this one and add red colred syntax:
Code:
Set rng = Nothing
Set rng2 = Nothing
On Error Resume Next
With Sheets("Sheet9")
LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
LC = .Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).Column
Set rng = .Range(.Cells(3, 1), .Cells(LR, LC)).SpecialCells(xlCellTypeVisible)
End With
With Sheets("Sheet2")
LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
LC = .Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).Column
Set rng2 = .Range(.Cells(3, 1), .Cells(LR, LC)).SpecialCells(xlCellTypeVisible)
End With
Bookmarks