Activechart.export Not Renaming Temp File

  • Hello,

    I am trying to export a chart using the code below, the loops change the data that is used to produce the chart:

    Each export command creates a file with the correct name but no data (0kb in size) and a temporary file that is the correct file type (I have tried both jpg and gif).

    I could try and copy the temporary file, but why does Excel not finish the job? I have tried to put a loop in and also added DoEvents after the export but no joy.

    Any ideas?



  • Re: Activechart.export Not Renaming Temp File


    I have stripped down the workbook and attached it to this post. Note that the data actually consists of another 50 or so columns taht I have deleted to reduce the file size. I have also deleted all data other than Profile 1 from the data table.

    Stop press.

    In stripping it down I decided to check it was still causing the problem. I noticed that the temporary filenames all had a DOS 8.3 filename using the ~ and a number. So I changed the code to create a filename with an 8.3 filename and it works!

    Workbook attached for demo purposes. I have added a button and a cell to use the long filenames so that you can easily reproduce the problem if you wish,



  • Re: Activechart.export Not Renaming Temp File

    Thanks for looking. Interesting it is an environment setting, not sure where I would look to change this, I will just tuck this away and try and remember it and always use 8.3. It is only to quickly generate some graphs for a report.



Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!