Page 1 of 1

Passing Parameters to Excel.

Posted: Wed May 06, 2020 11:14 pm
by byron.hopp
All,

I am puzzeled on how to use some of the methods in Excel, because the parameter passing is unusual.

Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets.Add(After:=ActiveWorkbook.Worksheets(ActiveWorkbook.Worksheets.Count))

Is there a way to make this work in Harbour / Fivewin?

Thanks,

Byron ...

Re: Passing Parameters to Excel.

Posted: Thu May 07, 2020 6:00 am
by anserkk
byron.hopp wrote:Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets.Add(After:=ActiveWorkbook.Worksheets(ActiveWorkbook.Worksheets.Count))
Try

Code: Select all

oSheet := oExcel:ActiveWorkbook:Sheets:Add( oExcel:ActiveWorkbook:Worksheets( oExcel:ActiveWorkbook:Worksheets:Count() ) )

Re: Passing Parameters to Excel.

Posted: Thu May 07, 2020 6:25 am
by byron.hopp
Thank you, if that is "After" then how would you do before?