OK.
Tools->Macro->Security
Dialog "Security" open.
On the tab "Trusted Publishers" mark check-bok "Trust acces to Visual Basic Project"
Also you can place the part of code inside Try...Catch...Finally...Endtry
You can see another example in one of the my old articles.
(The article in Russian, but code is native VFP :) )
http://www.js-software.eu/content_ru/excel_automation_solution_01.htm>Also getting the error:
>
>"Error Number: 1429
>Error: OLE IDispatch exception code 0 from Microsoft Office Excel: Programmatic access to Visual Basic Project is not trusted .."
>
>Thanks,
>
>Kevin