Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Background color change
I have a VBA routine, run from Access, that writes out data to an spreadsheet
(using Automation). In my spreadsheet I've added a routine to change the background color of any cell that is changed. The problem is, my Access program, in populating the spreadsheet, is causing the background to change as it writes values to the spreadsheet. I only want the background to change by a user, after the spreadsheet is populated Is there a way to do that? If I can programmatically add the event procedure to the spreadsheet after is is populated that would problaby do it. However, i don't know how to do that, or if it can be done. Thanks for your help. Regards, Leif |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Background color change
the first choice is
xlApp.EnableEvents = False but it is recognized that in some verions of Excel, this doesn't work. So next, Why not simply Cells.Interior.ColorIndex = -4142 ' xlNone after you are done updating. or restrict this code to the range where you were working. an alternative would be a cell that is normally blank but you place a value in it when you are ready to write. You change routine would be altered to not color this cell and not color any cell if this cell contains a value. then clear this cell at the end. Adding the event procedure would be a distant choice for me. http://www.cpearson.com/excel/vbe.htm -- Regards, Tom Ogilvy "Leif" wrote: I have a VBA routine, run from Access, that writes out data to an spreadsheet (using Automation). In my spreadsheet I've added a routine to change the background color of any cell that is changed. The problem is, my Access program, in populating the spreadsheet, is causing the background to change as it writes values to the spreadsheet. I only want the background to change by a user, after the spreadsheet is populated Is there a way to do that? If I can programmatically add the event procedure to the spreadsheet after is is populated that would problaby do it. However, i don't know how to do that, or if it can be done. Thanks for your help. Regards, Leif |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checkbox to change background color, font color and remove/ add bo | Excel Discussion (Misc queries) | |||
change background color | Excel Discussion (Misc queries) | |||
how can I conditionally change font color, or background color? | Excel Worksheet Functions | |||
change background row color with change of date in a cell | Excel Discussion (Misc queries) | |||
Change of text or background color doesn't change on the screen. | Excel Discussion (Misc queries) |