+ Reply to Thread
Results 1 to 2 of 2

Application.volatile not working

  1. #1
    Forum Contributor
    Join Date
    07-15-2011
    Location
    Whitby, Canada
    MS-Off Ver
    Excel 2010
    Posts
    121

    Application.volatile not working

    Hi all,

    I have a piece of code in a workbook (module 2) to change the colour of certain text when selected from a drop down list. Sometimes the colour changes, sometimes it doesn't it seems pretty random. I want the colour to change as soon as it's selected, I don't want to have to run the macro manually Here is the code:

    Please Login or Register  to view this content.
    So, if I select "OT" in cell B6, the colour changes - great...but if I select "OT" in cell B10 - nothing. Not sure where I've gone wrong but any help would be appreciated. Workbook attached
    TIA
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Application.volatile not working

    Application.Volatile is used to make a user-defined function recalculate any time the Excel application calculates -- it's not relevant to a sub.

    You'd need to call the sub from the Calculate event.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Application.volatile not working

    You could add this to your Change event code after the last End If
    Please Login or Register  to view this content.
    (untested)
    Good luck.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1