Very weird - Code does not work until after file is saved???

  • Thread starter Thread starter InfiniteJoy
  • Start date Start date
I

InfiniteJoy

My code is opening various workbooks, copying existing worksheets into
ThisWorkbook, and then closing the various workbooks.

I am trapping clicks on all charts so that a Chart Window opens. Then,
the chart is supposed to resize.

Upon copying in the worksheets, clicking a chart will always open the
chart window. But, the chart window will not resize (initially).

Only AFTER saving the workbook (or waiting for the AutoRecover time to
pass) will the chart window resize upon clicking.

Any insights to this one?
 
Hi,

Please post some of your code so that potential helpers can see your
approach & we may be able to make some informed suggestions.

Btw, I don't know if it will be the case in this situation, but there
are other situations that work this way by design in Excel eg resetting
the last cell of the used range won't occur until the file is saved.
It may just be that you need to incorporate a line like
"activeworkbook.save" into your code.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top