|
-
Nov 11th, 2002, 10:58 AM
#1
Thread Starter
New Member
ActiveX component can't create object.
ActiveX component can't create object.
Hi guys..
I have problem with exporting excel file to access..
it only happens when machine has access 2000, excel 2000.
with access 97 and 2000 doesn't prodce this problem..
so i am thinking there's some active X component missing between 97 and 2000...
my code is
sungaccess.Docmd.transferspreadsheet acimport, acspreadsheettypeexcel97...etc..
i don't know where to start to find the problem..
will you help me please..thanks..
-
Nov 11th, 2002, 11:10 AM
#2
Guess what?! The office object model changed slightly between 97 and 2000....
Since it works fine on Access 2000 and not on Access 97, your best bet would be to upgrade...... I know that when I open Access DBs in A2K that were created in A97, it askes me if I want "update" the DB to the "new" format.
-
Nov 11th, 2002, 11:28 AM
#3
Thread Starter
New Member
thanks techgnome..
what i am trying to find is what makes that happen..
what kind of active x component is differ from 2000 and 1997?
it only happen when i have access 2000..
-
Nov 11th, 2002, 11:42 AM
#4
Access (and Excel) changed. MS in their infinate wisdom didn't make the two object models (between 97 & 2000) compatible. So an app that works w/ office 2000 isn't going to work w/ office 97. Conversely, stuff that works w/ office 97, isn't going to work with office 2000.
-
Nov 11th, 2002, 12:57 PM
#5
Thread Starter
New Member
I made application on ms visual basic 6.0
-
Nov 11th, 2002, 01:22 PM
#6
Unfortunatly, VB isn't the issue: Access 97 & 2000 and Excell 97 & 2000 are. The 2000 object models are incompatible with 97 and if the VB reference is to 2000, it won't run on a machine w/ only 97. The reverse is also true. If t VB references the 97 object model, it isn't going to run on a machine w/ 2000.
I still think your best bet would be to get all machines up to Access 2000 and Excel 2000.
But that's just one gnome's opinion.
-
Nov 11th, 2002, 02:23 PM
#7
Thread Starter
New Member
any other ideas? or opinion?
-
Nov 12th, 2002, 10:43 AM
#8
Thread Starter
New Member
-
Nov 12th, 2002, 02:26 PM
#9
Only two ideas come to mind:
1) Upgrade so everyone is running the same office version
2) Use late bound to get the Excel/Access objects.
-
Nov 12th, 2002, 03:50 PM
#10
Thread Starter
New Member
sorry i am new to this vb developing...
what you mean by "Use late bound to get the Excel/Access objects"??
-
Nov 12th, 2002, 04:00 PM
#11
Instead of
VB Code:
Dim objExcel As Excel.Application
Set objExcel = New Excel.Application
where you would have a refrence to the Excel application in your VB app.... remove the reference, then try:
VB Code:
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
We've had to do that in several parts of our system due to the Office 97-2K problem.
-
Nov 13th, 2002, 11:25 AM
#12
Thread Starter
New Member
techgnome
Can you explain ..why you remove the reference?..
little bit more detail??
thank you so much..
-
Nov 13th, 2002, 02:26 PM
#13
Thread Starter
New Member
anyone have any explaination on it??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|