BojkoHB
05-16-2018, 12:31 AM
Hi guys
Since i'm new here and new on coding with macros and VBA - i'm totaly noob i need help
I'm gathering data on some things at home (bird watching, animals, ... ) basicaly on daily basis for a group that I'm in we then monitor movements.
Since these charts are quite some (10) i want to export them when i exit excel workbook at once not one by one and clicking on chart etc.
These pictures are then monitored on webpages so others in group can just open webpage not pptx or xlsx to see these pictures/charts.
i found this and adapted to my needs
Sub SaveChartAsPNG()
Dim sFileName As String
sFileName = ThisWorkbook.Path & "" & ActiveChart.Name & ".PNG"
ActiveChart.Export Filename:=sFileName, FilterName:="PNG"
End Sub
now my question is - IS IT POSSIBLE TO EXPORT AT ONCE ALL CHARTS IN SINGLE WORKBOOK AS PICTURE WHEN EXITING/CLOSING WORKBOOK?
When pressing X on excel workbook then after few secs (5-10s) pop-up would tell you eg - 10 charts exported as pictures! Have a nice day!
Thank you for your replies guys
Bye
HB
Since i'm new here and new on coding with macros and VBA - i'm totaly noob i need help
I'm gathering data on some things at home (bird watching, animals, ... ) basicaly on daily basis for a group that I'm in we then monitor movements.
Since these charts are quite some (10) i want to export them when i exit excel workbook at once not one by one and clicking on chart etc.
These pictures are then monitored on webpages so others in group can just open webpage not pptx or xlsx to see these pictures/charts.
i found this and adapted to my needs
Sub SaveChartAsPNG()
Dim sFileName As String
sFileName = ThisWorkbook.Path & "" & ActiveChart.Name & ".PNG"
ActiveChart.Export Filename:=sFileName, FilterName:="PNG"
End Sub
now my question is - IS IT POSSIBLE TO EXPORT AT ONCE ALL CHARTS IN SINGLE WORKBOOK AS PICTURE WHEN EXITING/CLOSING WORKBOOK?
When pressing X on excel workbook then after few secs (5-10s) pop-up would tell you eg - 10 charts exported as pictures! Have a nice day!
Thank you for your replies guys
Bye
HB