|
-
Nov 26th, 2002, 03:59 PM
#1
Thread Starter
Member
Error: Activex can not creaate object
Hi,
I created a project since more than one year and all this time it runs properly. But now whenever the following part of module runs: it gives me the error “Activex component can not create this object”
Public appExcel As Excel.Application
Sub Mod1()
Set appExcel = GetObject(, "Excel.Application")
….
End sub
I use the Package & Development Wizard / Dependency Information it told me that there is no dependency information for the following files:
Excel8.OLB Program Files\MS Office 97\Office
MSADO20.tlb Windows\system
MSEXCH35.DLL Windows\system
And those files are out of date:
MSRDO20.DLL Windows\system
MSSTDFMT.DLL Windows\system
THE FOLLOWING IS PART OF Dependency file
[MSADO20.TLB <0009>]
Dest=$(WinSysPath)
Date=30/10/98
Time=02:32
Version=0.0.0.0
[EXCEL8.OLB <0009>]
Dest=$(WinSysPath)
Date=22/04/97
Time=00:00
Version=8.0.0.4003
[MSEXCH35.DLL <0009>]
Dest=$(WinSysPath)
Date=24/04/98
Time=00:00
Version=3.51.623.0
Please how can I solve this problem (by reinstalling Windows OR Excel OR VB6 OR …….???)
Note: I have Windows 98 2nd Edition, Office 97 and 2K, VB6 .
I created this project under Windows 98 1st Edition
I used: appExcel as Object but no wy
Thanks in Advance
Sorry for the long question
Mina
-
Nov 27th, 2002, 11:05 AM
#2
Hyperactive Member
Mina,
from what ihave made out of ur problem, it seems that, when u created this project, u had excel 97, now u have upgraded to either office 2000 or office xp. Since the excel 97 library files have been overwritten by the new office version, u r getting the error. Hope this helps.
If Not VB Then Exit
------------------------------------------------
visit me @ http://mzubair.50g.com/
-
Aug 23rd, 2003, 05:39 AM
#3
Hyperactive Member
toughcoder, I've some problem but I never install 2000 over 97 (since I remember )
BTW, How could I solve this error. I had re-install VB and MS Office but it still trouble me
Thank..
Don't leave it till tomorrow, Do It Now!
5361726176757468204368616E63686F747361746869656E

-
Sep 11th, 2003, 08:40 PM
#4
Hyperactive Member
RESOLVED
I'd solve my problem now!! hope this may help other..
1. I change type of variable oExcelApp from Excel.Application to Object and same for workbook & worksheet
2. You must be sure ,u have Excel'd installed on ur machine.
VB Code:
Dim oExcelapp As Object, oExcelwk As Object
Private Sub Form_Load()
On Error Resume Next
Set oExcelApp = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
Set oExcelApp = CreateObject("Excel.Application")
DoEvents
End If
Err.Clear
Set oExcelwk = oExcelapp.Workbooks.Open("[yourexcelfile.xls]")
oExcelwk.Activate
oExcelapp.Visible = True
MsgBox "OK"
oExcelwk.Close False
oExcelapp.Quit
End Sub
use above code to test opening file excel
Don't leave it till tomorrow, Do It Now!
5361726176757468204368616E63686F747361746869656E

-
Sep 19th, 2003, 10:09 AM
#5
Frenzied Member
It appears that you have the wrong reference to Excel (otherwise the Object would still not have worked)
I would declare, as standard, all M$ products as late bound objects. It might be slow, but not as slow as when the network technicain fcuks around with what's installed on your client machines.
-
Oct 14th, 2003, 03:50 AM
#6
Banned
Hi Mina
i go through all your problem and all the answer.ok its fine that you get the problem .but this problem again rise
when you run your program in a computer and then you got the same messge.
the main cause is if the user have not the admin right.
because your program use active x control.
and this problem again depend upon the user rights.
so please check it out again
By Biswajit das
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
|