In the Worksheet_Calculate handling, or after the call?
Main Topics
Browse All TopicsHi,
Here is what I am trying to accomplish:
1) on opening a worksheet, force a calculation of the worksheet
2) once the recalculation is done, copy the full worksheet and paste the values only in a new worksheet
I have managed to complete all the process, except for one thing. When I do the recalculation of the worksheet, I do handle the Worksheet_Calculation event. In that event handling, I do the actual selection of the worksheet and create the new worksheet. The problem is that when I paste the values in that new worksheet, is pastes #RECALC, since I figure that the recalculation did not refresh the original worksheet yet.
How can I solve this issue?
Thanks for your help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I know, I just wanted to give you the exact sequence of events
Here is the code:
Private Sub Workbook_Open()
Sheets("Report").Range("H2
Sheets("Report").Calculate
Call Wait(10)
Sheets("Report").Cells.Sel
Selection.Copy
Dim wk As Workbook
Set wk = Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
Business Accounts
Answer for Membership
by: broomee9Posted on 2009-11-05 at 11:09:54ID: 25752783
Pause your code:
Declaration
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Sub Procedure
Sub Wait(Seconds As Single)
'MsgBox "start"
Dim lMilliSeconds As Long
lMilliSeconds = Seconds * 1000
Sleep lMilliSeconds
MsgBox "finish"
End Sub
How to call Sub Procedure
Call Wait(#) Replace # with any number (in seconds)