Options

execute excel function from NAV

bangswitbangswit Member Posts: 265
can we execute excel function that i have made in VBA after export from NAV?
before i export , i want to clear all the sheets
and then after finish importing, i want to some function
can we do that?

Comments

  • Options
    HalMdyHalMdy Member Posts: 429
    Simple way is to record a macro into your Excel Template file. Then from Nav, call the macro :

    CREATE(xlsApp);
    xlsApp.Run('MacroName','Arg1','Arg2',...);
  • Options
    bangswitbangswit Member Posts: 265
    HalMdy wrote:
    Simple way is to record a macro into your Excel Template file. Then from Nav, call the macro :

    CREATE(xlsApp);
    xlsApp.Run('MacroName','Arg1','Arg2',...);

    should i add global variable for xlsapp?
    i'm not using Macro but visual basic application in excel
    is it the same
    i have sheets named Sheets("Export")
    and there is a function named Sub Find_Cell()
    so how i generate it in navision?
    thanks
  • Options
    bangswitbangswit Member Posts: 265
    i add this code in predataitem but failed
    CREATE(xlsApp);
    xlsApp.Run('Sheets("Export").ClearForm');
    
Sign In or Register to comment.