Multiple macros in one workbook
Hello,
Your explanation is all very confusing. To see exactly what your code is
doing, open your VBE and keep it about half-screen with your Excel workbook
open in the background (you can move around the VBE while the code runs as
you see fit). Now, in the procedure you want to run, put your cursor
anywhere in that sub routine, then press F8 to begin stepping through your
code.
The first time you press F8 your code will compile. Everytime thereafter it
will execute the next (highlighted) line of code. With your windows
positioned just right you should be able to see what your code is doing.
Diagnose your code this way and amend your code as needed. Post back if you
need more help.
HTH
--
Regards,
Zack Barresse, aka firefytr
"CypherSmith" wrote in message
...
I have two worksheets in a workbook that generate pivot tables. I have
found
that if I run the macro associated with one of them, and then run the
macro
for the other, the second one loses data. I think that the problem may be
from the Advanced Filters that I use in both of these macros. They use
different filters, and are thus using separate procedures. However, much
of
the rest of the code is the same for each macro, with just an if statement
in
there to determine some small differences, so in those cases they use the
same procedures. I do not know why I am losing data here. If I just run
the
second macro, then it does not lose any data.
|