Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Fomatting

Status
Not open for further replies.

BTate

Programmer
Jan 30, 2001
23
0
0
GB
I haven't worked with VB for a long time but I would like to read through and excel document in VB checking all the fields, formatting the various fields and saving they document.

Has ayone got any examples that I could use.

Thanks
Bryan
 
Bryan,

A built-in Excel macro may be the way you want to go. I am actually working on the same thing. I'm able to perform about everything I want to in the macro (change page orientation, margins, fields widths, etc) but I don't know how to call this macro from the VB code. Right now, I'm just having the user run the macro each time with a shortcut command.

I'm not sure if the rest of the information you know or not but here I go. You begin creating your macro by creating a new Excel document. Save it as a template. Then start recording your macro from the tools menu bar. Just follow through all the steps you want the macro to do and then press the stop button. Then save it again. Then it's up to you where exactly you want to save this macro.

Hope this is of some help to you. Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top