Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Network:
Windows 2003 Server
Hello Sergej,
I checked message but article contain code for Excel 2007. I need it for Excel 2003. Sorting VBA macros was changed between this two versions. I also look in macro recorder in Excel 2003, but is was not enough. Recorder macro in Excel do not contain all necessary parameters. Borislav Borisov help me how to get range object from Excel. When I call Excel sort method from VFP in the same manner how it was recorder in Excel I still received error message from Excel. Searching on internet I found that sort method contain additional mandatory parameters which was not mentioned in recorder macro. When I add it to VFP code it work like a charm.
Here is final, working version.
m.loAppExc.Selection.Sort( m.loAppExc.Range( "B6" ), xlAscending, , , , , , xlGuess, 1, .F., xlLeftToRight, xlSortNormal ).
In middle of command you see series of commas, which are placeholders for mandatory parameters. This parameters did not appears in Excel recorder macro.
This is reason why I said that documentation of VBA available in excel is not enough.
Thanks for your help.
Maroš
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement