Methods Returning Worksheets

In Microsoft Excel 95, using the class "Excel.Sheet" as an argument to the CreateObject function, the GetObject function, or the CreateLink method returned a Worksheet object. In Microsoft Excel 97, using this argument with one of these methods returns a Workbook object. Code that uses these methods must be changed accordingly. You should be aware that any customized applications that control Microsoft Excel through OLE Automation will be affected by the changes to CreateObject and GetObject. Note that the following Microsoft Excel 95 code:

Set MySheet = CreateObject("Excel.Sheet")

Should become the following in Microsoft Excel 97:

Set MyBook = CreateObject("Excel.Sheet")
Set MySheet = MyBook.Sheets(1)