Rabu, 21 Januari 2015

Re: [ExcelVBA] Idiosyncrasies of VBA in Excel 2013


Glad that it was solved Dunbar!

... And thanks for getting back to us.


-----Original Message-----
From: h_dunbar@hotmail.com [ExcelVBA] <ExcelVBA@yahoogroups.com>
To: ExcelVBA <ExcelVBA@yahoogroups.com>
Sent: Tue, Jan 20, 2015 2:14 pm
Subject: Re: [ExcelVBA] Idiosyncrasies of VBA in Excel 2013

Lisa, thanks very much for the suggestion!   (I thought I responded yesterday, but I must not have hit 'send')

I AM using a 64-bit OS with my Excel 2013, and adding the DoEvents statement as you suggested did solve the problem.

Thanks again!


---In ExcelVBA@yahoogroups.com, <1z@...> wrote :

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: h_dunbar@... [ExcelVBA] <ExcelVBA@yahoogroups.com>
To: ExcelVBA <ExcelVBA@yahoogroups.com>
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 <1z@compuserve.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax 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