Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autocalculate when adding new worksheets via VBA 1

Status
Not open for further replies.

TimGoose

MIS
Aug 9, 2002
7
GB
I have an excel spreadsheet with VBA behind it. The spreadsheet has a "Template" worksheet which has all my formula etc on it. The VBA loops through data (originally obtained via SQL) and for each time through the loop:

1. Creates a new worksheet
2. Gives it a unique name
3. Copies all the formula etc from the "Template" to the new worksheet.

All that is working fine. However, every time a new worksheet is added it appears that Excel does an automatic recalculate, even though I have turned this off in the VBA.

Questions:

1. Does Excel ALWAYS do a recalculate when a worksheet is added?
2. Is it possible to stop this?

Many thanks

Tim
 


please post your code.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Typical! Someone points me back at my VBA and I spot the problem myself.

Although I can't be sure, it looks as if forcing a cell with no formula in it to calculate makes the whole sheet recalculate. However, the basic reason why the new sheet was recalculating was because I was telling it to. [blush]

Thanks, Skip!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top