I changed laptop (from excel 2007 to 2021) and I tried my excel 2007 macro document on a excel 2021. the PNG it generates makes my laser engraver crash.
is there any difference in the format windows 10 / excel 2021 saves PNG VS windows7 / excel 2007? if so, where are those settings PNG settings?
here is the macro. Set ws = ActiveSheet Set shp = ws.Shapes.Range(Array("Group 191"))
Set ch = ws.ChartObjects.Add(shp.Left, shp.Top, shp.Width, shp.Height)
shp.Select
ch.Chart.ChartArea.Border.LineStyle = 0
Selection.Copy
ch.Chart.Paste
Set tt = ch.Chart
tt.Export Filename:=ThisWorkbook.Path & "\KP2.png", filtername:="PNG"
ch.Delete
also using this macro: https://www.thespreadsheetguru.com/blog/vba-save-as-picture-file-excel same crash on the laser engraver software when loading the PNG generated with excel 2021. same excel document on 2007, the png does not make the laser engraver crash.
thanks
thanks for you help!