Applications Programming --- Lab 9

Objective:

References:

Your task:

Download the sample input file lab9-input.xlsx.

This file contains a worksheet named "AllCities" that lists the names of all cities where a company has offices. Write a VBA program that does the following:

  1. Count and display how many worksheets there are in this file.
  2. For each city in the list, check whether there is a worksheet with the name of that city in this workbook. If there isn't one, add one.
  3. Delete any city worksheet if the worksheet's name is not in the current AllCities list.
  4. Save the updates.
  5. Count and list how many worksheets there are in this file again.

There is a weekly Assignment 9 following this lab.