ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting not applied until cell is edited (https://www.excelbanter.com/excel-discussion-misc-queries/182430-formatting-not-applied-until-cell-edited.html)

Argent

Formatting not applied until cell is edited
 
This is one that's bugged me for years. The latest example is: I have a
macro which pastes a column of numbers into my worksheet (target cells can be
general or number it makes no difference) . Programmatically, I apply
conditional formatting to the pasted cells. Most of the time this works but
sometimes, the conditional formatting does not display until I hit F2 on each
cell in turn once the macro has finished. This is not acceptable as this
macro is part of a large Office application and runs automatically. My users
won't take kindly to having to fiddle with the spreadsheet. I do not want to
change the values in my cells, just have Excel format them properly. Surely,
there's a way - other than copy-paste multiplied by 0 - to get this to work?


Niek Otten

Formatting not applied until cell is edited
 
Try the Application.CalculateFull method

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Argent" wrote in message ...
| This is one that's bugged me for years. The latest example is: I have a
| macro which pastes a column of numbers into my worksheet (target cells can be
| general or number it makes no difference) . Programmatically, I apply
| conditional formatting to the pasted cells. Most of the time this works but
| sometimes, the conditional formatting does not display until I hit F2 on each
| cell in turn once the macro has finished. This is not acceptable as this
| macro is part of a large Office application and runs automatically. My users
| won't take kindly to having to fiddle with the spreadsheet. I do not want to
| change the values in my cells, just have Excel format them properly. Surely,
| there's a way - other than copy-paste multiplied by 0 - to get this to work?
|



Argent

Formatting not applied until cell is edited
 
Thanks Nick. Sadly, the CalculateFull not the CalculateFullRebuild method
made any difference.




All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com