Solved

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

Posted on 2010-11-07
10
852 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:mspcindc
  • 5
  • 5
10 Comments
 
LVL 2

Expert Comment

by:briwagner
ID: 34083803
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
0
 

Author Comment

by:mspcindc
ID: 34084484
This did not seem to do anything to my spreadsheet.  Any other ideas?
0
 
LVL 2

Expert Comment

by:briwagner
ID: 34085081
Can you post a copy of the spreadsheet. Be advised that anything posted here is public, so do not post proprietary data.
0
 

Author Comment

by:mspcindc
ID: 34089472
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?  
0
 
LVL 2

Expert Comment

by:briwagner
ID: 34089785
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
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:mspcindc
ID: 34089913
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?
0
 
LVL 2

Expert Comment

by:briwagner
ID: 34092093
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?
0
 

Author Comment

by:mspcindc
ID: 34094255
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
0
 
LVL 2

Accepted Solution

by:
briwagner earned 500 total points
ID: 34095243
In a situation where the problem is not always occurring, it could be caused by a multitude of things. Yes it could be memory related if you you normally have several large Excel files open and then didn't this morning. It could be the order of the steps you take to create and refresh the sheet.

You mention copying the sheet. Did you refresh the new copy or the old? Do you always copy the sheet first? Did you do anything different this morning from what you have done in the past?

My best recommendation for conserving memory when pulling data into Excel is to limit the data pull to only the data you need. Though I have a sheet that pulls back almost 900000 rows into a Pivot table and it is working fine.

If it continues to work with out issue, just calk it up to good living and don't question it, just go with it. It is nice when life throws one your way for free. :)


Regards,

Brian
0
 

Author Closing Comment

by:mspcindc
ID: 34123134
Thank you very much
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now