Passing Parameters to Excel.

Post Reply
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Passing Parameters to Excel.

Post 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 ...
Thanks,
Byron Hopp
Matrix Computer Services
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Passing Parameters to Excel.

Post 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() ) )
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: Passing Parameters to Excel.

Post by byron.hopp »

Thank you, if that is "After" then how would you do before?
Thanks,
Byron Hopp
Matrix Computer Services
Post Reply