Senin, 19 Januari 2015

Re: [ExcelVBA] Idiosyncrasies of VBA in Excel 2013


Hi Dunbar,

Are you using a 32 or 64 bit OS?

I've come across something similar.

What happens if you put a DoEvents statement between the Range statements?


-----Original Message-----
From: [ExcelVBA] <>
To: ExcelVBA <>
Sent: Mon, Jan 19, 2015 4:08 pm
Subject: [ExcelVBA] Idiosyncrasies of VBA in Excel 2013

I'm in the process of making sure a workbook that I developed in Excel 2003 will also work in later Excel versions.   I've got three things giving me trouble in Excel 2013, even though they work fine in 2010 and earlier.   
Here's the first...

I have the following code at the beginning of one of my subs, just after the variable declarations:

Application.ScreenUpdating = True
Range("SeriesAbort").Value = "Use ESC key to cancel    "
Range("SeriesSimRunning").Value = "Calculation in progress" 
Application.ScreenUpdating = False

In Excel 2003 and 2010, both cells get the new values when I run the Sub.

In 2013, only the "SeriesAbort" cell gets a new value.  If I switch the order of the middle 2 lines, then only the "SeriesSimRunning" cell gets a new value.

If I step through the code, both cells get the new values.  If I immediately (after those 4 lines) go to the end of the Sub, both cells will have the new values.   If I reach the end of the Sub normally, both cells will have the expected values at that time. 

If I delete Application.ScreenUpdating = False, then both cells get the new values.

I realize that showing here just a snippet of the total code is not optimal, but I'm hoping someone might have an idea what could cause this only in Excel 2013.




Posted by: Green <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: to enter the ezine, then search the ARCHIVES for EXCEL VBA.

Visit our ExcelVBA group home page for more info and support files:

More free tutorials and resources available at:




Tidak ada komentar:

Posting Komentar