Results 1 to 1 of 1

ExportAsFixedFormat misalignment of chart data

Threaded View

gsmitman ExportAsFixedFormat... 03-01-2010, 02:28 PM
  1. #1
    Registered User
    Join Date
    03-01-2010
    Location
    Indy, IN
    MS-Off Ver
    Excel 2007
    Posts
    1

    ExportAsFixedFormat misalignment of chart data

    This one should be easy, but I can't fix it and am asking for help.

    I have a client that wants to be able to publish *.pdf versions of select sheets within the workbook. Two worksheets have overlapping charts on them. The charts, when I push to *.pdf, do not line up. (In fact, they look odd, with axis, labels, etc. out of place)

    I can push a chart to a Chart1 page, but I have overlapping charts (I show an overlay on an earned value progression chart).

    Here's the simple code:

    msg = "Publish to PDF format?"
    Dialogstyle = vbQuestion + vbYesNo
    Title = "Save *.pdf Report"
    RESPONSE = MsgBox(msg, Dialogstyle, Title)
    If RESPONSE = vbYes Then
    FileName1 = InputBox("Please input filename", "Filename", ProjectName & Month(Date) & "-" & Day(Date) & ".pdf")
    ' I was able to export, as an image, the single chart. It looks okay as an image
    ActiveWorkbook.Charts(1).Select
    ActiveChart.Export "test.png"
    ' This doesn't work, and I know why:
    'ActiveWorkbook.Sheets("A_2-ExecWorkChart").Select
    'ActiveSheet.Export "test2.png"

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    FileName1 _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=True
    End If
    'This seems extra:
    If RESPONSE = vbNo Then
    End If
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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