Options

Automation, MS Excel.

DurandDurand Member Posts: 61
edited 2002-03-26 in Navision Financials
Hello,
I make report for transfer a data in a Excel file with some sheet. I have a problem.
I do not reach to find the method to select a sheets of this file.
Thank you, Benoît Durand

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at this topic

    http://213.119.140.220:38001/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=5;t=000001

    in the Tips & Tricks forum.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    DurandDurand Member Posts: 61
    Hello, I make a report which feeds a file Excel (with several Sheets), according to different criteria, with a monthly frequency. The data are sent to follow.
    I should so get back the address of the last cell. In VBA I use the following code:
    ActiveSheet.SpecialCells(xlLastCell).activate
    SLigne = Activecell.Address
    I do not reach in C / AL with the previous answers, Thank you for the help.
    Benoît Durand
    <img border="0" title="" alt="[Confused]" src="images/smiles/icon_confused.gif" />
  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    Selecting the last active cell in VBA is done with:

    ActiveCell.SpecialCells(xlLastCell).Select

    In C/AL thris translates to:

    XlApplication.ActiveCell.SpecialCells(11).Select;

    Tip to find the numeric value for the xlConstants: Create a VBA macro where the same function is used, put the cursor on the xlConstant and press ctrl-I (I as in Isaac).

    John
Sign In or Register to comment.