Avatar of mspcindc
mspcindc
Flag for United States of America asked on

Excel 2007 Refresh to odc MsAccess Connection losing conditional formatting - need VBA solution

I am having trouble after the data refreshes in 2007 with the conditional formatting.  I have the developer "EnableFormatConditionsCalculations" set to True.  I also have External Data Properties Data Formatting and Layout with the Preserve Column Cell Formatting checked.  I've tried all of the "if the number of rows in the data range changes upon refresh" options.

I have 2 columns which are using the provided icon sets "3 arrows colored" and 1 column using the "3 traffic lights rimmed"

The worksheet columns are returning number data:  ie 100 for green arrow, < 100 and > 0 for yellow arrow and <=0 for red arrow

Ive tried some of the other code I found in the solutions however I cannot seem to modify it to make my situation work.  I placed a developer command button on my spreadsheet but I am lost getting Excel code to work.

Any help would be appreciated
Microsoft ExcelSpreadsheetsVisual Basic Classic

Avatar of undefined
Last Comment
mspcindc

8/22/2022 - Mon
briwagner

Have you tried the recalculation Hot Keys.

Shift+F9 Recalculates Active Worksheet.
CTRL+ALT+Shift+F9 Forces Excel to rebuild the dependency tree and forces recalculation.

Regards,

Brian
mspcindc

ASKER
This did not seem to do anything to my spreadsheet.  Any other ideas?
briwagner

Can you post a copy of the spreadsheet. Be advised that anything posted here is public, so do not post proprietary data.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
mspcindc

ASKER
The spreadsheet is extremely proprietary however I think I have a better clarification for my problem.  The table linked is a pivot table.  My conditional formatting remains on all charts and tables links which  are not a pivot table.  I have seen that there are issues with the pivot table in other posts.  I am just not sure how to address it.  Do you still need my report?  
briwagner

How are you setting up the conditional Formatting? There should be choices under Apply Rule To: for applying to all cells showing "Field Name" Values. Have you tried selecting these? If I just choose the cells in the pivot and refresh the formatting is only on the cells I selected originally. If I change the rule to All cells showing "Field Name" values, it changes with the refresh.

Brian
ScrnShot.jpg
mspcindc

ASKER
I  hate to be an idiot - but I do not see the top part of the edit formatting rule where you chose the "All cells showing "Sum... on my spreadsheet.  Do I need to check a different box to have this portion appear?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
briwagner

Are the formatted cells actually in the pivot table or are they copies linked to the pivot table? If so, does the number of cells with data stay the same?
mspcindc

ASKER
Hmm.  I do not know what to tell you.  I was preparing a table that I could attach for public viewing and made a copy of the spreadsheet for when I lost all of my formatting.  When I hit refresh this time - I did not lose my formatting.  My guess is that I may be experiencing a memory issue.  I have a Toshiba Portege R600 with an Intel Core 2 Duo CPU U9400 @ 1.40 GHz with 3.00GB of memory using the 32bit Windows Vista.  I should have enough memory however I have another spreadsheet that has multiple connections back to the access database which is starting to show issues by not redrawing the charts unless you click on them and then only half the chart shows up.  

This spreadsheet has been losing my conditional formatting for weeks - why it has decided not to do it this morning - I do not know.  I appreciate your time - If you think that this is all caused by memory and the conditional formatting is the last to fire, please let me know.  I am using the data connection wizard - odbc dsn connection to my database instead of queries because it is a deliverable.
If there is a more memory efficient way to connect, please let me know.

Thank you

Kathy
ASKER CERTIFIED SOLUTION
briwagner

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mspcindc

ASKER
Thank you very much
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23