PDA

View Full Version : GetObject method in Excel 2004 for MacOs



lclqt12
01-22-2007, 08:12 AM
I have a file that run code below :


Dim wb as Variant
set wb = GetObject(path) 'path is the path of excel file

It can't be run. It's alert : file name or class not found ....
But when i create new file and the path is pointed to new file. It's run OK.

I'm sure that path is right. Because when i run
Dim wb as Variant
set wb = Excel.WorkSheets.Open(path) 'path is the path of excel file

It's run OK. So i think the file that i try to open has some special things that GetObject method in Mac can't be run ( in windows, it run well )

And i don't want to use Excel.WorkSheets.Open. Because, it's slow than GetObject method. So how can i solve this problem?

lucas
01-22-2007, 08:30 AM
So this is a Mac issue? We have a Mac forum with experts on mac. Would you like to have this thread moved to the Mac forum?

shades
01-22-2007, 07:54 PM
Answered in the Mac forum
(http://vbaexpress.com/forum/showthread.php?t=11145).