Using After in Excel sheet.ADD

SPost29SPost29 Member Posts: 148
Hi all,
Yes I searched and failed.
How do I use the optional AFTER (variant) parameter in the Excel .add command
in Navision?
This is what it looks like in the Excel help example:

ActiveWorkbook.Sheets.Add Before:=Worksheets(Worksheets.Count)

I presume 'After' would be substituted for 'Before' in the example
but how in Nav?

Thanks
Steve

Comments

  • ufukufuk Member Posts: 514
    I think you can write something like that:
    XlWrkshts := XlWrkBk.Worksheets.Item(PageIndex);
    XlWrkSht := XlWrkBk.Worksheets.Add(XlWrkshts);
    
    I'm not sure if this solves your problem but you can use pageindex to select a page and then give this page as an parameter to the add method.
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.