Hi
I have an excel form/file which I open from an Excel Macro.
The excel macro does some formatting etc to the form/file while it is being opened.
Everything has been running fine for over a year.
However now for some unknown reason, there is some huge waiting time on some cells when I try to format them (eg changing to bold/unbold, right alignment, etc)
This only happens to some of the cells, not on all.
Here is an example:
QN.Range("C" & the_row + 1 & ":L" & the_row + 1).Font.Bold = False
This takes some 25 seconds to do !
The funny thing is that if I open the Excel form/file directly (not via the macro), and I try to format the cells, everything works perfectly.
So it all points to the macro which opens the excel form/file....might be doing something to the cells while opening the form...but what ?
What could I do via code to make the formatting take 25 seconds to process !!!????
Note there are no formulas on any of the cells, they are "free text" cells.
When macro is being used on other computers, everything runs fine...this only happens on my laptop (which happens to be the development machine!)
To me it looks more like a corrupt file, virus ????
Amazingly the macro I run is huge (hundreds of routines) and there are not problems anywhere on the code (apart from the formatting I mentioned)
So I don't think the macro file would be corrupted, because I don't see problems anywhere else on the macro/code.
Has anyone had this problem before and, most importantly, how can I fix it ?
Look forward to your comments
I have an excel form/file which I open from an Excel Macro.
The excel macro does some formatting etc to the form/file while it is being opened.
Everything has been running fine for over a year.
However now for some unknown reason, there is some huge waiting time on some cells when I try to format them (eg changing to bold/unbold, right alignment, etc)
This only happens to some of the cells, not on all.
Here is an example:
QN.Range("C" & the_row + 1 & ":L" & the_row + 1).Font.Bold = False
This takes some 25 seconds to do !
The funny thing is that if I open the Excel form/file directly (not via the macro), and I try to format the cells, everything works perfectly.
So it all points to the macro which opens the excel form/file....might be doing something to the cells while opening the form...but what ?
What could I do via code to make the formatting take 25 seconds to process !!!????
Note there are no formulas on any of the cells, they are "free text" cells.
When macro is being used on other computers, everything runs fine...this only happens on my laptop (which happens to be the development machine!)
To me it looks more like a corrupt file, virus ????
Amazingly the macro I run is huge (hundreds of routines) and there are not problems anywhere on the code (apart from the formatting I mentioned)
So I don't think the macro file would be corrupted, because I don't see problems anywhere else on the macro/code.
Has anyone had this problem before and, most importantly, how can I fix it ?
Look forward to your comments