Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Diem Tran   on Dec 27 In MS Office Category.

  
Question Answered By: Morris Hughes   on Dec 27

So you just want to display a form with a message, and unload it when the sort
is done. The problem is to keep Excel from executing the Unload command before
the sorting  is finished. I had a similar problem once, and I created a Boolean
variable (DoneFlag) which I set to False initially. Then I began a loop in which
I executed my code (in my case, Hyperion Essbase retrieves). The loop continued
as long as DoneFlag was False. To determine when DoneFlag should be set to True,
the loop examined the contents of a particular cell. When the Essbase retrieve
was done, that cell would be overwritten with a different value. The loop
included a DoEvents command also.

Perhaps you could do something similar by noting the values in several cells
before you begin sorting, and give the Unload command when you see that any has
changed. This method can work, but depending on your data there may a risk that
the cells would end up with the same values after sorting as they had before
sorting (causing an infinite loop).

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How to show temp Msg? Or get search suggestion and latest updates.


Tagged: