Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 11th, 2003, 03:49 AM
Authorized User
Join Date: Jun 2003
Location: Swansea, , United Kingdom.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy a pivot table fo a new sheet for formatting


I am running a access 97 database to create a pivot form based on a table. What I would like to do is format the headings of the Pivot Form and apply some bolding to the text etc. Is this at all possible from VBA??? I think I would need to copy the form into a new sheet but dont now how!!!

Many thanks


Reply With Quote
  #2 (permalink)  
Old February 2nd, 2005, 12:21 PM
Friend of Wrox
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts

Is this an Excel Question? It sounds like you ought to post this in the access vba forum.



Reply With Quote
  #3 (permalink)  
Old February 12th, 2005, 06:11 PM
bml bml is offline
Registered User
Join Date: Feb 2005
Location: , , Canada.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

You can modify various parts of the pivot by selecting the part you want to format and then changing the settings for the portion selected.

Search VB Help for pivotselect

Some sample code:

    ActiveSheet.PivotTables("PivotTable1").PivotSelect "NAME[All]", _
    With Selection.Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With

This code would bold the labels for the pivot object NAME

For an easy way to determine the required code, record a macro, do what you want
done, and then look at the macro to see what the code looks like.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Workbook,Copy Sheet,Move Sheet, Close/Save ptrussell2009 Excel VBA 0 June 13th, 2008 02:28 PM
dts - formatting excel sheet using activex script Najmunnisha SQL Server DTS 2 May 17th, 2007 10:27 PM
Copy specific data from one sheet to another yogeshyl Excel VBA 2 May 11th, 2007 09:14 AM
Copy one sheet to another file shamigc Excel VBA 2 April 13th, 2005 06:45 AM
Marcro to copy data from one sheet to another Crupa Excel VBA 1 November 24th, 2004 04:12 AM

All times are GMT -4. The time now is 03:25 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.