Lesson 12 - For Each Next 2

Outcome of this Lesson

(The one with the cute dogs!)

In Part 2 we look at two more examples of For Each … Next

These examples combine the For Each … Next Loop with the If … Then … statement to check whether a sheet has a color assigned to its tab.

In Lesson 12 we have these examples:

  • For Each … to Hide Sheets with No Tab Color
  • For Each … to Hide Sheets with Tab Color

You can put these macros to immediate use.

For instance you might have sheets with Tab Colors to indicate they should be visible to users, and sheets with no Tab Colors for working calculations that you want to hide from users.


Download the workbook

After you watch the video, I recommend you open the example workbook.

And play around with declaring constants.

You can get the workbook at the beginning of Module 5 (Downloads).

Refer to the PDF Handout

For a handy summary of the key concepts, look at the Module 5 PDF Handout.

You can get the PDF Handout at the beginning of Module 5 (Downloads).



Write your comments and feedback below

  • If you have questions or comments about this lesson, write it in the section below.
  • Alternatively you can email the instructor Victor at [email protected]

Complete and Continue  
Discussion

0 comments