+ Reply to Thread
Results 1 to 14 of 14

VBA Chart wizard - Insert Footer

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    VBA Chart wizard - Insert Footer

    I have a macro to create a chart dynamically and i want to be able to add a footer or text to the bottom of the chart if possible, i would like to know what the property is to do this, my code is below:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    You can use axis titles, if not already being used.

    Or a textbox.

    Macro recorder should give you the code you need.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Quote Originally Posted by Andy Pope View Post
    You can use axis titles, if not already being used.

    Or a textbox.

    Macro recorder should give you the code you need.

    Thanks Andy

  4. #4
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    I have added this line of the code, but im not sure if im on the right track, i cant say any textbox on the chart.

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    Looks okay to me.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Andy i cant see the footer on the chart, am i missing something?

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    Hard to tell. Can you post example workbook where the chart is created but the footer does not appear.

  8. #8
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Quote Originally Posted by Andy Pope View Post
    Hard to tell. Can you post example workbook where the chart is created but the footer does not appear.
    Andy i have it working , it was the size of the chart inside the userform window that i needed to adjust. Many thanks for your help Andy.
    Last edited by PRodgers4284; 10-20-2009 at 04:29 AM.

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Andy im trying to adjust the footer placement at the bottom of the chart, the textbox is appearing at the very bottom along the chart border, what is the syntax to change the bottom indent?

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    This part adds the textbox with the Left,Top,Width,Height values calculated from the charts properties.

    So change the 3rd argument.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Andy im getting a error with "AddTextbox" stating ("Wrong number of arguments or invalid property assignment") with the code below:

    With ActiveChart
    With .Shapes.AddTextbox(msoTextOrientationHorizontal, _
    .PlotArea.InsideLeft + 40, _
    .ChartArea.Top - 1, _
    .ChartArea.Height - 5, _
    .PlotArea.InsideWidth - 100, _
    40)

  13. #13
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: VBA Chart wizard - Insert Footer

    Please add code tags to your previous post.


    Because you have 5 arguments.

    Please Login or Register  to view this content.
    I would guess you don't want the second top calculation.
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: VBA Chart wizard - Insert Footer

    Got it working

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1