View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Class Module for setting Automatic Calc

I've never seen anyone post this kind of problem (and I never used shared
workbooks in real life).

But maybe someone else is opening the workbook, toggling the calculation to
manual, saving the workbook and the other person opens that workbook as the
first workbook resulting in manual calculation setting.

(But I think you're much better off adding the protection for your macro into
the code of your macro!)

GregR wrote:

Dave, I think what happens is, if the workbook is opened by more than
one individual at the same time, the calculation gets set to manual.
That is only a problem for me when I run a macro that copies a sheet
from the workbook and pastes the values into a new workbook. If
calculations have not occured, the new workbook has errors.

I've taken your suggestion and added a line to my code which forces
calculations just before the copy function. I am assuming that the
line:

Application.Calculation = xlCalculationAutomatic

will force a calculations.

Greg


--

Dave Peterson