B
Bishop
I have a workbook with two worksheets: Tally Sheet and Catalyst.
I have 2 procedures in this workbook: TallySheetRep and BanSum.
BanSum take a list of data and deletes all the duplicates.
TallySheetRep takes the same data (after BanSum runs), formats it, and
places in my Tally Sheet worksheet.
I call BanSum from TallySheetRep. Here's the problem. If I run
TallySheetRep while in the Catalyst worksheet everything runs fine. But if I
run TallySheetRep while I'm in the Tally Sheet worksheet the code starts
deleting all the duplicate lines in the Tally Sheet worksheet. Here's the
basic layout of my two procedures:
Sub TallySheetRep()
Call BanSum
With Sheets("Catalyst")
...sort, edit, etc.
copy data to sheet Tally Sheet
With Sheets("Tally Sheet")
...populate some formulas
End Sub
Sub BanSum()
With Sheets("Catalyst")
...sort, delete dups, etc.
End Sub
It's like BanSum totally disregards 'With Sheets("Catalyst")' and runs the
code right on the Tally Sheet worksheet instead. Even if I'm on the Tally
Sheet worksheet shouldn't the BanSum code 'go to' the Catalyst worksheet when
it's called? Why is this happening?
I have 2 procedures in this workbook: TallySheetRep and BanSum.
BanSum take a list of data and deletes all the duplicates.
TallySheetRep takes the same data (after BanSum runs), formats it, and
places in my Tally Sheet worksheet.
I call BanSum from TallySheetRep. Here's the problem. If I run
TallySheetRep while in the Catalyst worksheet everything runs fine. But if I
run TallySheetRep while I'm in the Tally Sheet worksheet the code starts
deleting all the duplicate lines in the Tally Sheet worksheet. Here's the
basic layout of my two procedures:
Sub TallySheetRep()
Call BanSum
With Sheets("Catalyst")
...sort, edit, etc.
copy data to sheet Tally Sheet
With Sheets("Tally Sheet")
...populate some formulas
End Sub
Sub BanSum()
With Sheets("Catalyst")
...sort, delete dups, etc.
End Sub
It's like BanSum totally disregards 'With Sheets("Catalyst")' and runs the
code right on the Tally Sheet worksheet instead. Even if I'm on the Tally
Sheet worksheet shouldn't the BanSum code 'go to' the Catalyst worksheet when
it's called? Why is this happening?