Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Excel Scripting Experts

Excel Scripting Experts
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 2005
Status: Offline
Reply With Quote
Feb 11, 2005, 04:59 AM
 
I've recently moved from a PC to a Powerbook G4 and the VBA code in one of my Excel spreadsheets no longer works.

The code:

Dim A
Set A = CreateObject("Scripting.Dictionary")

returns the error:

ActiveX component can't create object


I've tried creating a blank workbook with just this code, but get the same error. This works fine in Excel for Windows.

Any thoughts?
     
Professional Poster
Join Date: Mar 2002
Location: Boston
Status: Offline
Reply With Quote
Feb 11, 2005, 06:12 AM
 
My guess is the object has not been defined in excel for the mac, there are other objects (none come to mind right now) that I ran into when moving my spreadsheets/vba macros to the Mac.

Mike
     
Fresh-Faced Recruit
Join Date: Feb 2005
Status: Offline
Reply With Quote
Feb 11, 2005, 07:49 AM
 
Any way of importing the object?
     
Professional Poster
Join Date: Mar 2002
Location: Boston
Status: Offline
Reply With Quote
Feb 11, 2005, 12:23 PM
 
Originally posted by Budweiser:
Any way of importing the object?
If you have access to a PC, take a look at references within the VB editor, that is Tools-> References. Perhaps its as simple as the object not being selected for the Mac flavor.

Mike
     
Dedicated MacNNer
Join Date: Jun 2000
Status: Offline
Reply With Quote
Feb 11, 2005, 12:25 PM
 
ActiveX is not supported on the Mac side (thumbs down to MS).

I have done testing/consulting for cross-platform integration of VBA solutions, and this is one of several that cause problems. One alternative is to use Forms rather than Control toolbox to create the object. Also, several of the References (Tools > Reference) in VBA are not available for the Mac. Likwise, if you need ODBC support, you will have to look at third-party solutions. Yep, MS provides free ODBC for Windows, but not for Macs. If you need I can give you couple of links.
Ignore the argumentative nature of this poster. He is old and can't engage in meaningful dialog
very long. Therefore, management asks that you at least humor him. Thanks.
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Feb 11, 2005, 01:27 PM
 
Just to be exact, the ODBC layer is very much present on MacOS X. The problem is that there is a scarcity of ODBC drivers for the big DB's out there on MacOS X. This is starting to change, but the changes are new enough that people still have the old impression.
     
Dedicated MacNNer
Join Date: Jun 2000
Status: Offline
Reply With Quote
Feb 11, 2005, 01:59 PM
 
Yep, you're correct. I had been in a hurry and hadn't specified that it was the drivers. Thanks.
Ignore the argumentative nature of this poster. He is old and can't engage in meaningful dialog
very long. Therefore, management asks that you at least humor him. Thanks.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:46 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2