LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Delaying until Recalcu code is done.

Let me get it clear first.
You have a procedure (Procedure1) in which you write to the cell. Then
you have another procedure (Procedure2) fired by the change in the cell
(may be worksheet_chage).
Right?

So what you do is.
1. If there is no module in your vba project insert a module.
2. At module level declare a public vairable as under -
Public canInow as Boolean
Declare this public vairable out side any procedure. (The top line,
before any Sub.. should be above declaration line.)

3. In Procedure1, just before you write to cell, enter following:-
canInow = False
'your code to write to cell
4. After your code to write to cell, you wait for canInow to become
True. The enitre code will look like :-
canInow = False
'your code to write to cell
10
If Not canInow Then
DoEvents
GoTo 10
End If
'your rest of the code.

5. Now in Procedure2, the last line before End Sub Should be:-
canInow = True

Sharad




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Excel VBA- Time delaying macro bsmith1 Excel Programming 4 July 8th 04 10:05 PM
Delaying calculations Jerry Park Excel Programming 0 September 22nd 03 02:33 PM


All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"