• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Excel macro and javascript

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am able to open an excel sheet using javascript and now i want a macro to run as soon as the excel sheet is opened.
I have used Auto_Open() and it runs fine when i open the excel sheet manually but when i open the sheet using javascript the macro does not run at all.

Here is the javascript code i have written to open the excel file.

function openExcel(){

var Excel; // Declare the variables
Excel = new ActiveXObject("Excel.Application");
Excel.Workbooks.Open("C:/Final templates/MyExcel.xls");
Excel.Visible = true;
}

Is there a way to run this macro..?

Thanks
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic