monkeybonez
04-22-2009, 12:19 AM
Hi
i just want to open a excel map via VBS and run a makro,
i do this like followed:
Set XL = wscript.CreateObject("Excel.Application")
Set XLWorkBook = XL.Workbooks.Open(Path)
Set XLWorkSheet = XLWorkBook.WorkSheets.Item(1)
XL.run "AutoMark", "YES", "YES"
But if someone has different versions of office installed (2003/2007)
it tries to open excel 2007 maps (.xlsm) with office 2003 and gets an error.
This is since a Office Update from Microsoft in the last weeks.
So i tried to open the Map like this:
Set XL = GetObject(Path)
XL.Application.Run "'" & Dateipfad & "'" & "!Automark", "YES", "YES"
This worked just fine! But after i opened the map its not usable anymore!!
when i open the map in excel it is !!invinsible!! The makro still works but
i cant see the Worksheets anymore... this is so sick!
In the Makro itself, i set the application invinsible if it gets opened by script.
But that cant be the mistake because excel is visible, just the worksheet
is not viewed..
Maybe i dont close the "XL" object correct?
Thanks
i just want to open a excel map via VBS and run a makro,
i do this like followed:
Set XL = wscript.CreateObject("Excel.Application")
Set XLWorkBook = XL.Workbooks.Open(Path)
Set XLWorkSheet = XLWorkBook.WorkSheets.Item(1)
XL.run "AutoMark", "YES", "YES"
But if someone has different versions of office installed (2003/2007)
it tries to open excel 2007 maps (.xlsm) with office 2003 and gets an error.
This is since a Office Update from Microsoft in the last weeks.
So i tried to open the Map like this:
Set XL = GetObject(Path)
XL.Application.Run "'" & Dateipfad & "'" & "!Automark", "YES", "YES"
This worked just fine! But after i opened the map its not usable anymore!!
when i open the map in excel it is !!invinsible!! The makro still works but
i cant see the Worksheets anymore... this is so sick!
In the Makro itself, i set the application invinsible if it gets opened by script.
But that cant be the mistake because excel is visible, just the worksheet
is not viewed..
Maybe i dont close the "XL" object correct?
Thanks