Hi,
I am working on a VBA application. It's nearly finished and I have to acknowledge the help I have got on a couple of problems already from StephenR, SixthSense and AndyLitch. All the problems relate to VBA syntax and the specific manner in which loops are coded. I have one more problem and I hope that some VBA coding expert out there will be able to quickly spot what's causing the problem.
I am attaching a slimmed down version of the application which illustrates the problem.
Here we are starting with a small range of Type 2 records (just 3 of them). We also have 2 small tables (for Business Units and Roles).
When the 'Synch Tables' routine is run, a row is inserted for all possible combinations of Business Unit and Role (4 x 3 = 12 in this illustration). The inserted rows are set to be 'Type 1' records and the intention is that all of the Type 1 rows are hidden when the Synch Tables routine has completed.
When the Synch Table routine is re-run, all existing Type 1 records are deleted and a new set is added. This all works fine.
The problem is that 12 exrta rows are being hidden every time the routine is run and I can't figure out why this is happening. It's driving me crazy !!!
I know this has to be something really simple and I suspect again it must be some little piece of VBA syntax that I am missing. I am not a programmer so I struggle at times with this type of problem.
I am hoping that someone can spot the problem so that I can put the application back on track and get it finished.
Many thanks,
GTOL
Bookmarks