VBA Save As gives wrong values on the Y axis of a graph

Stijno88

New Member
Joined
Mar 6, 2025
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi all

I'm new on this forum, but have a little experience with Excel VBA coding.
I struggle to find out what is causing a certain behaviour.

When running the code below, which is started with a Button on sheet 1, the graphs on sheet 2 are changed.

VBA Code:
ActiveWorkbook.SaveAs fileName:= _
totalDirectory & ".xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

The Y-axis of the graphs, gives values that are divided by 1000, instead of the original values. (see picture in attachment)
Even when changing the variables (for example max and min in the settings) within Excel, the fault is still happening.
The only way to fix it, is the re-start the workbook.
This fault is visible when exporting to PDF and printing.
Also with different laptops and office 365/2021.

I have googled and searched multiple message boards, but I'm out of ideas.

Does anybody has an idea what could cause this?

Thanks!

BR
Stijn
 

Attachments

  • Example.jpg
    Example.jpg
    120.6 KB · Views: 4

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