Controlling Excel from another application

  • Thread starter Thread starter CustomSoftware
  • Start date Start date
C

CustomSoftware

I'm trying to programmatically create footers, headers etc.
in Excel using Visual Fox Pro's programming language. I can
create an instance of Excel with this syntax:
oExcelObj = createobject( 'Excel.Application' )
and a reference to a page with this:
oPage = oExcelObj.Workbooks.Add
I've figured out how to format cells in the workbook, but
I'm working by trial and error to find this information.
Where in the Excel documentation or in MSFT's body of
documentation, can I find how to reference these
"properties" of an Excel worksheet?
 
Look at Microsoft Excel Objects in VBA Help, and work your way down.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
The easiest way is to turn on the macro recorder in Excel and perform the
action manually. This will provide the kinds of insights you need to know
where to look and what to use. Note that if you are using late binding,
that the values of constants will not be defined and you need to use their
numeric value.

Once you have found the basic objects, you can explore/enrich your knowledge
by using the object browser in the VBE. Select any object or attribute in
the object browser and hit F1. If the help files are installed, you will
then get the help for that item.

Another way is to type the keyword in the module, highlight it and hit F1.

Activesheet.PageSetup.LeftFooter = ThisWorkbook.FullName

with the macro recorder on, do View=>Headers, custom footer, etc.
 
Back
Top