Consulting

Results 1 to 4 of 4

Thread: help with re-calculating Excel UDF

  1. #1

    help with re-calculating Excel UDF

    Hi VBA community!

    In the worksheet I have a UDF to count the number of cells filled with the different color background. However, sometimes when I added or removed some colors, or deleting rows, the code below didn't work to recalculate the UDF, except when I pressed F2 and press Enter.

    Appreciate any help with a code how to allow the UDF to recalculate when I press the common button. I'm using Excel 2003.

    Thanks!

        Application.Volatile
        Application.Calculate
        ActiveWorkbook.RefreshAll

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Maybe try:
        Application.CalculateFull
    Hope that helps,

    Mark

  3. #3
    Thanks GTO! It works.

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Happy to help!

Posting Permissions

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