Results 1 to 10 of 11

Thread: Export And Save Chart As PNG With Custom Sequential Name

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    24
    Rep Power
    0

    Export And Save Chart As PNG With Custom Sequential Name

    I want to have png file name as d140302.png the next one d140303.png instead of Chart 49 02-03-14_03.42.51_PM.PNG please help me i attached the png fileAttachment 1501


    Code:
    Sub blah()
            With ThisWorkbook.Worksheets("min max & march of khamir")
              For i = 1 To 61 Step 2
                lr = .Cells(Rows.Count, i + 1).End(xlUp).Row
                .ChartObjects("Chart 2").Chart.SetSourceData Source:=.Range(.Cells(1, i), .Cells(lr, i + 1))
                .ChartObjects("Chart 2").Chart.Export ThisWorkbook.Path & Application.PathSeparator & "Chart " & Format(i, "00") & " " & Format(Now, "DD-MM-YY_HH.MM.SS_AM/PM") & ".PNG"
              Next i
            End With
            End Sub
    Last edited by Excel Fox; 03-03-2014 at 09:56 PM. Reason: Code Tag Added

Similar Threads

  1. Custom Charts in Excel :: Gauge Chart (aka Dial/Speedometer Chart)
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 08-07-2013, 05:16 PM
  2. Custom Charts in Excel :: Butterfly Chart
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 07-04-2013, 12:42 PM
  3. Custom Charts in Excel :: Waterfall Chart
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 06-21-2013, 04:52 PM
  4. Replies: 1
    Last Post: 05-20-2012, 12:23 PM
  5. Save Chart As A Picture VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 05-14-2011, 04:28 PM

Posting Permissions

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