Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Very inexperienced self taught VBA in excel user needs help... PLEASE.

$
0
0
I've written a macro in excel 2003 which looks down a list of workgroups, finds the first and then creates a new workbook. It then looks down another list of people referenced to workgroups and, when it finds one from the right workgroup, it copies an existing template from the first workbook, fills it with a report about that person (from data in the first workbook) and then moves it to the new workbook for that workgroup. Once it has found all the people in one workgroup it saves (as a predefined name) and closes the workbook and moves to the next workgroup. There are 8 workgroups and around 90 people.

It all seems to work swimmingly which, as a self taught amateur, I am well chuffed about. The only thing is that after a while the move sheet operation stops working and you just get an error. If I open up excel and then run it, it does around 20 sheets. If I run it again It only does two. If I close it down and run it again it does 20 again.This leads me to believe that there is a Cache somewhere which I am filling up and a) I don't know where it is and b) I want to be able to clear it.

Obviously I can always run the report for 1 group at a time (which works by the way) but I would feel beaten and very depressed :confused:

Please help.
Ta

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>