Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Worksheet_Calculate never stops (Excel 2003)

    I have a template that has Worksheet_Calculate event in it that works fine in Excel 2000 but the event is always fires in Excel 2003. Any ideas?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Worksheet_Calculate never stops (Excel 2003)

    Are there any other differences?

    Do you have (for example) the function =now() in a cell (which triggers calc events constantly) and in the XL2000 workbook, you have manual calc and in XL2003 autocalc?

    Steve

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Worksheet_Calculate never stops (Excel 2003)

    Thanks. I have found the problem, it is occurring in the WorkSheet_Calculate event subroutine. By placing Application.EnableEvents = false and then setting it to true upon leaving the sub everything is ok now. I read in a Wrox book( Excel 2002 VBA, page 194 - 195) that Excel 2000, and 2002 usually handles this correctly with the need of enableevents being set to true and false.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •