Consulting

Results 1 to 3 of 3

Thread: How to run excel module from javascripts?

  1. #1
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    3
    Location

    How to run excel module from javascripts?

    Hi all,

    I would like to run an excel module from Javascript, the following is the codes I'm using to open an excel file, the next thing i want to do is to execute a pre-defined excel module (sub), what should I do?

    [VBA]var exc = new ActiveXObject("Excel.Application");
    exc.visible = true;
    exc.workbooks.open("abc.xls");
    exc.ActiveSheet.Range('A1').value = 123;
    'execute/run an excel module here, e.g. SelectRow()[/VBA]


    Many thanks!!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    This is not tested, but you could try

    [vba]

    exc.Run "SelectRow"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    3
    Location
    thanks! but it doesn't work, seems syntax error in javascripts....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •