+ Reply to Thread
Results 1 to 2 of 2

Worksheet On Change Calls Sub to change Cell colors

  1. #1
    Registered User
    Join Date
    06-29-2005
    Location
    Boston, MA
    Posts
    56

    Worksheet On Change Calls Sub to change Cell colors

    I sent out large transactions files with filters for each office location to filter on their location.
    Often times I turn filters on check pieces of information myself. Most times, I forge to turn them off before sending
    The receipients then assume the filters are not on, and email me back asking where their location's data is. . .

    So, the bulk of the change on the worksheet is changing the filter settings.

    I have written a sub which goes through the filter row to highlight colors if any of the filters are turned on.
    to find them very easily for me. . . to keep my customers happy. .

    But the code isn't working quite right yet
    What am i missing??


    Please Login or Register  to view this content.
    in module
    Please Login or Register  to view this content.

    thanks in advance!
    sportsguy

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Worksheet On Change Calls Sub to change Cell colors

    Hi SportsGuy

    Event Code is like black magic in the VBA world. First you need to have it in the Sheet module, which it looks like you do. Then you need to key on it somehow, using the correct event type. I like to use the OnDoubleClick but you need the OnChange (maybe). My question is this: If you select a different filter in C9 does the data in cell C9 really change? If it doesn't change then the OnChange code won't trigger.

    After doing some reading it looks like there is a newer (since Excel 2007) code to trigger on TABLES. Do some stud with the two links below and things will get clearer. You should also be putting breaks in your code and stepping through it a line at a time to see what happens.


    http://www.cpearson.com/excel/Events.aspx
    http://www.jkp-ads.com/articles/Excel2007TablesVBA.asp

    Your question of "What am I missing?" isn't an easy one to answer. I think you just need to learn more about event code and how tables deal with it.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 07-05-2012, 04:41 PM
  2. Excel 2007 : How Do I Change Cell Colors??
    By Ranger SVO in forum Excel General
    Replies: 2
    Last Post: 05-25-2011, 10:31 PM
  3. auto change cell formula on condition of worksheet change in other cells
    By futurejock in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-01-2009, 12:11 AM
  4. [SOLVED] How do I change worksheet tab colors when it is not an option,
    By kidmac in forum Excel General
    Replies: 1
    Last Post: 03-15-2006, 07:50 AM
  5. [SOLVED] Change worksheet tab colors
    By Rita Palazzi in forum Excel General
    Replies: 2
    Last Post: 07-29-2005, 10:05 AM

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