Is it possible to pause the VBA code to give Excel time to calculate before proceeding? What's the VBA statement?
I read about a wait time function but that pauses the entire application and would not allow for calculations.
Thanks,
D
Is it possible to pause the VBA code to give Excel time to calculate before proceeding? What's the VBA statement?
I read about a wait time function but that pauses the entire application and would not allow for calculations.
Thanks,
D
Last edited by dreicer_Jarr; 02-23-2011 at 11:54 PM.
______________________________________
"Vision without Execution is a Hallucination"
Edison
Let me know if I can clarify the issue. ANY help would be appreciated.
Thanks,
D
What does the code look like?
I will post when I get to my second PC (in an hour or so).
Code below, but note that the goal is to start and stop on the data hub page. The ranges SumR and SumT are on two separate tabs (this can't be changed unfortunatly). Also, G1 changes to 1, 2 or 3 based on the user selecting a drop-down box...the box is linked to cell G1. THANKS!
Please Login or Register to view this content.
I would greatly appreciate some help if anyone is willing?
Thanks,
D
hi,
I'm not sure what you need, does your use of "Calculate" not work?
Here's a modified version of your code, with a few extra comments...
Please Login or Register to view this content.
hth
Rob
Last edited by broro183; 02-23-2011 at 07:57 PM. Reason: spotted two typo's
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
That code did not work but thanks very much for trying. I fixed the problem using the following code, but frankly, I can't tell the difference -- it seems like your more efficient code should have worked. How can I write what is below more efficiently but so it does the exact same thing? (Note: G1 is on the data hub sheet)
Please Login or Register to view this content.
hmmm... interesting!
It works for me what doesn't work for you?
Does it error, or just give unexpected results?
Are you running the code over sheets in the same workbook as the code is stored in (ie "with Thisworkbook")?
Do you have more than one of each of the Named Ranges in the file you are working on (ie on different sheets but still called "SumR" or "SumT")?
Do you know how to press [F8] to go through the code a line at a time?
(place the cursor on a line within the macro first)
EDIT: then, while you are stepping through the macro move the mouse cursor over each of the lines while they are highlighted yellow & see what values are revealed. Is it what you expect?
/END EDIT
What happens if you...
RobPlease Login or Register to view this content.
Last edited by broro183; 02-23-2011 at 09:41 PM.
I had more than one range named on different sheets. I must have done that by mistake somehow. Thanks for all of the help. Another issue resolved! I really like this Web forum.
Beauty!
I'm pleased I could help, thanks for the feedback, adding to my rep' and marking the thread as Solved
btw, Chip's website has a useful explanation of "Global-Scope And Sheet-Scope Names" on this page: http://www.cpearson.com/excel/DefinedNames.aspx
Plus here's a free & very useful addin for working with named ranges: http://www.jkp-ads.com/officemarketplacenm-en.asp
Rob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks