Help: VBA macro for worksheet formatting

  • Thread starter Thread starter ylin
  • Start date Start date
Y

ylin

Dear All:


I have following task but don't know how to get it done in VBA:

I created a few data listings in a EXCEL file - each listing is a
worksheet in this file. Every worksheet/listing has its own formatting
(basically the fonts, sizes and widths of each column) and I can
create different VBA macros to do formatting for every worksheet. My
question is: how can I create a VBA macro in PERSONAL.XLS to
automatically finish these steps (if this is possible):

1) open this EXCEL file
2) open each worksheet by its name, one by one
3) call formatting VBA macro for this active sheet and run it
(of course, these formatting macros will all be stored in
PERSONAL.XLS)
4) after finishing the formatting for active worksheet, go to next one
and do the same thing until all formatting is done
5) close EXCEL file and exit

The reason I want to get everything done from one VBA macro in
PERSONAL.XLS is that programs in other languages can use DDE to run
this macro.

Thank you very much for any information or sample codes to do similar
functions.


Y. Lin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top