Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

formatting reports

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Formatting in reports

Formatting in reports

ResolvedVersion 2007

Dave has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Formatting in reports

I will need to be able to create formatted reports with typical tables on a number of worksheets

Is there a way to create a template object, or series, that I can call rather than cutting and pasting into the worksheet ranges separately

RE: formatting in reports

Hi Dave

Thank you for your question

It is possible to write a procedure that would;
1. Create a new workbook
2. Place entries and value directly into certain cells
3. Format various cells as required.

as an example, the following code snippet shows you how to create a workbook ad some values and do some basic formatting


Application.Workbooks.Add

ActiveWorkbook.Sheets(1).Range("A1").Value = "My New Template"

ActiveWorkbook.Sheets(1).Range("A1").Interior.Color = vbRed

ActiveWindow.DisplayGridlines = False

ActiveWorkbook.Sheets(1).Columns("A").EntireColumn.AutoFit


Hope this is useful

Regards

Stephen

Wed 14 Jan 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Change the default location for opening and saving spreadsheets

If you are always opening spreadsheets from and/or saving documents to a specific location that is not My Documents, save time by setting this folder as the default for opening files from and saving files to.

Here's how:
1. Go to Tools - Options.

2. Select the General tab.

3. Enter the pathname of the folder you wish to make the default in the Default File Location box (hint: it will be easier to use Windows Explorer to navigate to this folder, then copy and paste the pathname from the address bar at the top of the Windows Explorer screen).

4. Click OK.

You have now changed the default folder for opening and saving spreadsheets.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.