frustrated
Gentlemen:
I have been writing VBScript for 3 years now. I have tried everything I know. And I still can’t get a script to run successfully that interacts with Excel. Granted I have never tried working with Excel and VBScript before. But it can be that different. Here is the simplest script I can find I tried this in and outside of Macro Scheduler:
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("e:\test.xls")
the error returned is
Line 2 Character 1
Object Required objExcel
I also tried
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("e:\test.xls")
– at that point I got :
Line 3 Character 1
– with nothing specified for the object
Could there be something wrong with Excel itself???
VBScript and Excel
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
There is nothing wrong with this code. Works fine for me. So I guess your Excel installation must be broken. As you say, it fails to work outside of Macro Scheduler also. I would reinstall Excel, or do a Repair from Control Panel/Add Remove...
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
dont work for me
im using excel 2007 in vista and I get the same thing.
Was this resolved with a new install
Thanks
Was this resolved with a new install
Thanks
Aaron
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I'm also using Excel 2007 in Vista.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?