Found a work around to access the 'Constants'. Ended up just making a function which strips out the constants from the QAxObject (thru the 'generateDocumenation') and stores them in a QHash. Not super elegant, but workable, and a lot faster then I originally thought it would be. Of course it is prone to having issues in future releases of QT, if they for some reason change the formatting that 'generateDocumentation' produces.
As for making a default parameter... so far no dice. Seems strange that no-one has used ActiveQT and a member function which requires the use of a 'Type.Missing' variant as a place holder. So far I've managed to work around it, but again not the prettiest solution. For instance if you want to add a worksheet onto the end of a workbook, you have to call 'Add(before,after)', where 'before' would be the sheet to insert before (use a 'Type.Missing' variant if you will use the 'after' item), and 'after' would be the sheet to add it after. Basically I had to duplicate the last sheet (puts a copy before the last sheet), then run the add sheet passing the last sheet (which puts the new sheet before the last sheet), then finally remove the last sheet. Works, but it is sure a lot more steps!




Reply With Quote

Bookmarks