ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help or Information about Microsfot Excel Aplication Objet model (https://www.excelbanter.com/excel-programming/393425-help-information-about-microsfot-excel-aplication-objet-model.html)

Alonso Vilela

Help or Information about Microsfot Excel Aplication Objet model
 
Now I know how create object (VFP) and do something but I want more
information about object tree and sintax or Examples.

I now most common object a

oxl = createobjet("Excel.application")

oxl.application
oxl.workbooks.
oxl.Sheets.

Thanks



Jim Thomlinson

Help or Information about Microsfot Excel Aplication Objet model
 
You are missing the heirarchy of the objects. The syntax you provided will
not work. The application contains workbooks which in turn contain worksheets
which in turn contain ranges. So you need something more like

oxl.workbooks("Mybook").Worksheets("MySheet").Rang e("A1")

You can not get to the range directly without specifying the book and sheet.
the same is true of the sheet. You can not have

oxl.worksheet

because you have not specified the book.
--
HTH...

Jim Thomlinson


"Alonso Vilela" wrote:

Now I know how create object (VFP) and do something but I want more
information about object tree and sintax or Examples.

I now most common object a

oxl = createobjet("Excel.application")

oxl.application
oxl.workbooks.
oxl.Sheets.

Thanks





All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com