>Below is the macro I recorded in Excel, can someone tell me the right way to format this in vfp. I already have an object reference called oSheet which was created using osheet=CreateObject('EXCEL.sheet')
>I've got the data in the sheet, and I've selected the text I want to format. But I don't know how to format this macro in VFP:
>
>Selection.AutoFormat Format:=xlRangeAutoFormatSimple, Number:=False, Font _
> :=False, Alignment:=False, Border:=False, Pattern:=False, Width:=True
>
>Thanks
>Kirk
You will need to reference the office automation documentation for the AutoFormat() method. VFP does not support named parameters like in the macro so you will need something like
oSheet.Selection.AutoFormat(xlRangeAutoFormatSimple,.F.,.F.,,.F.,.F.,.T.)
Basically you need to know the order of all the parameters so you can put in the appriate numbers of commas, skipping parameters you don't use and including the ones you do.
Rip Ryness
International Falls, MN