Originally Posted by
[email protected]
I've cleaned up the code to the best of my ability, using Mike's tips as a guide. I've tried several other little changes, but I usually seem to screw up my output.
I've attached the workbook, if anybody wants to take a look at it, and here is the code.
Thanks for any help or suggestions offered.
Jerry
Hi,
Just a general observation. Clearly a lot of that code was captured through the macro recorder. That's fine when starting out or getting the syntax for sonething you can't quite remember, but the big nuisance with the recorder is that it captures absolutely every parameter available and uses the default setting property. I find that most of the time default properties are fine and hence you can delete just about everything you've recorded apart from any where you don't want the default.
You commented about why is took so much code to set the border. That's a classic case. The recorder captures all four sides of a border. If you're happy with a fours sided border then replace all the four sets of code with
It is quite a long procedure and I suggest for readability if nothing else it would be better broken down into separate procedures, calling them one by one from a master control procedure, or in a chain from each procedure in the chain.
HTH
Bookmarks