View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SteveM SteveM is offline
external usenet poster
 
Posts: 133
Default Format sheet programmaticlly??

On Dec 28, 6:39 pm, Mekinnik
wrote:
Is it possible and how do you format a sheet programmaticlly in VBA. I would
like to format a newly created sheet once the data is copied or when the data
is copied from another sheet. I would like to format the new sheets with
borders and header rows with bold names to match the coorisponding data in
that column.


The easiest way to generate formatting code is to create a template of
what the populated sheet would look like and then format it as desired
with the macro recorder turned on. Then go back and make any
customized adjustments to the macro that are required and you're done.

A real key for making your life easier is to use named ranges and
format on the range names rather than specific cell addresses. That
way, if the range dimensions change, you don't have to go back into
the code and change the range designations. There are other methods
for dynamic range selection, but this is a good way to start.

Try those first and see how you make out.

Good Luck.

SteveM