+ Reply to Thread
Results 1 to 19 of 19

Excel 2003 / 2010 compatibility

Hybrid View

asgersax Excel 2003 / 2010... 11-22-2012, 04:08 AM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 04:25 AM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 04:29 AM
arlu1201 Re: Excel 2003 / 2010... 11-22-2012, 05:36 AM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 06:52 AM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 10:32 AM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 10:48 AM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 11:03 AM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 11:16 AM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 12:31 PM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 12:47 PM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 12:58 PM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 01:05 PM
JosephP Re: Excel 2003 / 2010... 11-22-2012, 02:17 PM
asgersax Re: Excel 2003 / 2010... 11-22-2012, 04:25 PM
asgersax Re: Excel 2003 / 2010... 11-23-2012, 04:41 AM
asgersax Re: Excel 2003 / 2010... 11-23-2012, 04:43 AM
JosephP Re: Excel 2003 / 2010... 11-23-2012, 08:33 AM
asgersax Re: Excel 2003 / 2010... 11-30-2012, 10:46 AM
  1. #1
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2003 / 2010 compatibility

    does this work any better?
    Sub export_figures()
       Dim folder_name            As String
       Dim wsRpt                  As Worksheet
       Dim wsCharts               As Worksheet
       Dim oShp                    As Shape
       Dim ch                     As Chart
       Dim vNames
       Dim vRanges
       Dim n                      As Long
    
       vRanges = Array("A1:O45", "A50:P104", "A106:P165")
       vNames = Array("Production", "Injection", "Deferred")
       Set wsRpt = ThisWorkbook.Sheets("MONTHLY REPORT + TCM TEMPLATE")
    
       folder_name = wsRpt.Range("S25").Value
       
       Set wsCharts = Worksheets.Add
       Set oShp = wsCharts.Shapes.AddChart(xlColumn, 0, 0, 10, 10)
       Set ch = oShp.Chart
       
       Application.ScreenUpdating = True
       For n = LBound(vRanges) To UBound(vRanges)
    
          With wsRpt.Range(vRanges(n))
             oShp.Height = .Height
             oShp.Width = .Width
             .CopyPicture Appearance:=xlScreen, Format:=xlBitmap
          End With
    
          With ch
             .Paste
             .Export Filename:=folder_name & "\" & vNames(n) & ".png", FilterName:="PNG"
             .ChartArea.ClearContents
          End With
       Next n
       Application.DisplayAlerts = False
       wsCharts.Delete
       Application.DisplayAlerts = True
    End Sub
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  2. #2
    Registered User
    Join Date
    10-11-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Excel 2003 / 2010 compatibility

    Hi Again.
    I found a way to avoid the problem by inserting "On Error Resume Next"...
    Not the best solution in any way but it works!
    But thanks for your help

+ 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