PDA

View Full Version : Solved: ScreenUpdating Problem



Sir Babydum GBE
12-04-2012, 05:57 AM
I recorded/wrote a whole load of code on one of my office PCs

I exported the code to a central drive, imported it to the personal.xls workbook of another PC.

SO the code on the 2nd PC is identical.

On PC1 Screenupdating = FALSE works fine
On PC2 it doesn't work at all

So I record a test macro on PC2 in a new module, and switch screenupdating off succesfully. But when I run the imported macros, doesn't work.

Next step I deleted the modules from personal on PC2. Created fresh modules, and copied the text from the saved modules into the new modules. Still no joy

The code works fine, it does everything it's supposed to - except slower because of the screenupdates being visible

What's going on?

=========================================================================== ===========
Edit: I Just noticed that PC1 is running Excel 2003 (no sevice Pack) and Visual Basic 6.3. PC2 is running Excel 2003 SP3 and Visual Basic 6.5. Could this be making the difference?

Kenneth Hobs
12-04-2012, 06:42 AM
You might check the state of autocalc in both.

Here are my speed routines:
http://vbaexpress.com/kb/getarticle.php?kb_id=1035

Teeroy
12-04-2012, 01:53 PM
Does your code call any procedure outside of itself? This may change the state of Screenupdating (commonly at the error handler). And there may be a version difference between a sub being called on the new PC and the original.

I had the above scenario once and it did my head in until I peppered the code with state checks (followed by a head slapping moment).

Sir Babydum GBE
12-05-2012, 10:46 AM
Well thanks both for your suggestions. I solved the problem...

I did some more research and someone else who had a similar proble said it was an add-in issue.

So I checked my add-ins. It was a skype add-in for MS office. Must have been a bug, but I uninstalled it and both work fine now.