Share via

error 438 when changing from application.calculate to activeworkbook.calculate

Anonymous
2012-07-09T17:11:54+00:00

I have an ontime event that triggers an application.calculate every n seconds.  I have been trying to change the application.calculate to ActiveWorkbook.calculate but i keep getting a '438 object doesn't support this property or method' on the command button2_click  every time I do.  Does that ring a bell to anyone?

Thanks,

Dan

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-07-09T17:39:44+00:00

You need to call Calculate on the Application, a Worksheet, or a Range. There is no calculate method for a Workbook.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-07-09T19:09:25+00:00

    My error sorry.  I am now using application.activesheet.calculate but still am have some performance issues when all 3 workbooks are open that I do not have when I use only one workbook at a time.  What is the best was to manage the calculations of 3 workbooks.  I want to control the frequency of calculations by using an ontime event (which I am currently doing).  This ontime event is launched from within one of the 3 workbooks.  I only want the activesheet to calculate when the ontime fires.  So, only one worksheet is ever calculating at once (the one with focus).  Hopefully I explained this ok.

    Thanks,

    Dan

    Was this answer helpful?

    0 comments No comments