Consulting

Results 1 to 2 of 2

Thread: Solved: Sheet Calculate Event Not Working

  1. #1
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    323
    Location

    Solved: Sheet Calculate Event Not Working

    I'm trying to activate the "Private Sub Worksheet_Calculate()" on a specific sheet from a module. I have the following code in a module and it is not activating the calculate event on the worksheet. Can anyone advise what I am doing wrong?

    [VBA]
    Application.ScreenUpdating = True
    Sheets("Both Platoons").Calculate
    Application.ScreenUpdating = False
    [/VBA]

    Thanks
    Gary

  2. #2
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    323
    Location
    Disreguard this post, I had EnableEvents set to false. The following did it.

    [VBA]
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    Sheets("Both Platoons").Calculate
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    [/VBA]

    Thanks
    Gary

Posting Permissions

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