upgrade to 4.2023.3.23 broke code
Posted: Thu Apr 06, 2023 2:27 pm
I have a code file that I have been using for many years. I updated to 4.2023.3.23 this morning, and I can no longer get the code to export my jpg file.
I am getting the following error:
An unhandled exception of type 'System.NullReferenceException' occurred in TeeChart.dll
Additional information: Object reference not set to an instance of an object.
The code I have been using is:
Dim lcsMetric1Daily4020_LCS2 As New Steema.TeeChart.Chart
.......
Dim Jpeg As Steema.TeeChart.Export.JPEGFormat
Jpeg = lcsMetric1Daily4020_LCS2.Chart.Export.Image.JPEG
Jpeg.Height = 450
Jpeg.Width = 750
Jpeg.Save(Path_1 & ".jpeg")
I tried changing the code to the following, but it still gives me the same error.
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Height = 450
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Width = 750
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Save(Path_1 & ".jpeg")
Please advise on how to correct this issue.
I am getting the following error:
An unhandled exception of type 'System.NullReferenceException' occurred in TeeChart.dll
Additional information: Object reference not set to an instance of an object.
The code I have been using is:
Dim lcsMetric1Daily4020_LCS2 As New Steema.TeeChart.Chart
.......
Dim Jpeg As Steema.TeeChart.Export.JPEGFormat
Jpeg = lcsMetric1Daily4020_LCS2.Chart.Export.Image.JPEG
Jpeg.Height = 450
Jpeg.Width = 750
Jpeg.Save(Path_1 & ".jpeg")
I tried changing the code to the following, but it still gives me the same error.
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Height = 450
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Width = 750
lcsMetric1Daily4020_LCS2.Export.Image.JPEG.Save(Path_1 & ".jpeg")
Please advise on how to correct this issue.