Hi guys, I am really new to vba. I managed to piece together the below macro but I can't seem to get autocalculate to turn back on and would appreciate some help.
![]()
Please Login or Register to view this content.
Hi guys, I am really new to vba. I managed to piece together the below macro but I can't seem to get autocalculate to turn back on and would appreciate some help.
![]()
Please Login or Register to view this content.
Last edited by thinlizzy; 06-27-2012 at 05:21 PM. Reason: code tags
With a recorded macro I get this line.
You add it before End Sub.
![]()
Please Login or Register to view this content.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
I tried that and when the macro ran it still didn't turn on Autocalculate. I am not sure![]()
And if you put the code above?
I'm not a VBA expert, but the code should work.![]()
Please Login or Register to view this content.
If not, wait for other to react.
Yeah, I pretty much tried placing it everywhere with no success. I need autocalculate to stay turned off until the sub macro rename runs.
Thanks for the attempt though.![]()
Maybe a stupid question, but i asked it anyway.
You active a cell with a formula after running the macro?
Excel don't actived the recount itself automaticly.
Please use code tags, OP... thanks.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Let me try to explain better, sorry. What I have is a macro I am using to copy sheets from one location and paste them into the workbook I have open. Then I have the macro rename that runs after that which will fill in some blank cells for me on the sheets I pasted. The problem I have is that I used Application.Calculation = xlCalculationManual
to speed up the macro. Now when the macro is done none of the formulas I have in other worksheets will update.
thanks for the reminder
Last edited by thinlizzy; 06-27-2012 at 04:38 PM.
thinlizzy,
Welcome to the forum!
Thank you for adding the code tags
As to your question, your code can be condensed to the following:
![]()
Please Login or Register to view this content.
Then, to use it you would call it from a main sub, feeding it the destination worksheet, like so:
![]()
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
Thanks tigeravatar. I tried what you mentioned, but when each tab is pasted into the workbook it slows down while the formulas are recalculated.
You could put the application disable/enable items in the Testing sub instead of the CopyToSheet sub. You will still get a slowdown while the formulas are recalculated, but this way they won't get recalculated until after all sheets have been copied over, instead of being recalculated in between sheet copies per destination sheet.
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
that is really good, but is there any way to call out thisso that it will also run in the testing before the calculation gets turned back to automatic?![]()
Please Login or Register to view this content.
Here's a cleaned up version of the Rename sub:
![]()
Please Login or Register to view this content.
Now, in the Testing sub, put Rename just after the "Next ws" line:
![]()
Please Login or Register to view this content.
Last edited by tigeravatar; 06-27-2012 at 05:19 PM.
That doesn't help, that solves everything! Thank you so much.
You're very welcome![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks