Solved

Edit macro to allow for worksheets in Active workbook

Posted on 2013-11-07
1
256 Views
Last Modified: 2013-11-07
Hi Expert's

how would I amend the following vba


Sub calcSheets() Dim WS_Count As Integer Dim I As Integer ' Set WS_Count equal to the number of worksheets in the active ' workbook. WS_Count = ActiveWorkbook.Worksheets.Count ' Begin the loop. For I = 1 To WS_Count ActiveWorkbook.Worksheets(I).EnableCalculation = False ActiveWorkbook.Worksheets(I).EnableCalculation = True Next I End Sub

so ws count corresponds to 7 worksheets. ..
0
Comment
Question by:route217
1 Comment
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
Comment Utility
You can't change the count of worksheets unless you delete or add worksheets.

If you only want to loop through the first 7 worksheets use this.
For I =1 To 7

Open in new window


If it's 7 specific worksheets you want to work with we'll need more information.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now