How to repeatedly change the value of a Cell and export each Graph to External Folder

Nayasoch

Board Regular
Joined
Sep 9, 2016
Messages
73
Hello Everyone,

I am looking for solution to change a value of one cell from 1 to 100,( which directly link to column source of Graph Data ) with step of 1.00 each time and export each Graph i.e Total 100 in External Folder so that I could compare them and compiled them to make a Gif to show Progress of Graph

Till now for exporting Graph , I'm using this code. But I have to do it manually and it is okay to export 5-6 Graph but now I want to export 200-400 Graphs as value of A1 changes continuously from 1 to 100
Code:
Public Sub ExportALLCharts()
    Dim outFldr As String
    Dim ws As Worksheet
    Dim co As ChartObject








    outFldr = GetFolder(ActiveWorkbook.Path)
    If outFldr = "" Then
        MsgBox "Export Cancelled"
    Else
        For Each ws In ActiveWorkbook.Worksheets
            For Each co In ws.ChartObjects
          
               co.chart.Export outFldr & "\" & ws.Name & ".png", "PNG"
            Next co
        Next ws
    End If
End Sub








Function GetFolder(strPath As String) As String
    Dim fldr As FileDialog
    Dim sItem As String
    Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
    With fldr
        .Title = "Select folder to export all of the Figures to"
        .AllowMultiSelect = False
        .InitialFileName = strPath
        If .Show = True Then sItem = .SelectedItems(1)
    End With
    GetFolder = sItem
    Set fldr = Nothing
End Function
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top