Using C++ and OLE, how might I go about obtaining the ID of the worksheet that is currently in focus?
For example, I have the following code:
Variant excelSheets;
Variant excelSheet;
excelSheets.OleProcedure("Add");
excelSheet= excelSheets.OlePropertyGet("Item", 1);
I would like to add a sheet and then get the sheet that was just added so that I may add content. The above code only works if the user doesn't shift focus away from the sheet which is at the far left.
Seth