In the example (excel2000dem.prj), the program gets a handle to the first worksheet on line 322 with the code:
error = Excel_SheetsItem (ExcelSheetsHandle, NULL, CA_VariantInt(1), &ExcelWorksheetHandle);
If you refer to the help for this function, you will see it returns a specific worksheet from a collection of worksheets. In this case, it is returned the first worksheet as specified by the 3rd argument CA_VariantInt(1). If you want the second worksheet, you would change the 1 to 2, which would be:
error = Excel_SheetsItem (ExcelSheetsHandle, NULL, CA_VariantInt(2), &ExcelWorksheetHandle);
ActiveX programming takes some time to get used to. When looking at the example, pay close attention to the sequence of ActiveX calls that are taking p
lace and try to understand what each function in the sequence is doing.
Best Regards,
Chris Matthews
National Instruments