Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active X problem

Status
Not open for further replies.

cin2002

Programmer
Mar 19, 2002
29
US
Hi All,

I have a really big problem. I tried to have a spell check on my program. The code as following. It works fine on window 98 and 2000, but when I run it on window 95, It pops up "Run-time error '429': Active component can't create object" error message and close out everything. Can't everyone tell me how to fix?


Dim oWord As Word.Application
Dim oTmpDoc As Word.Document
Dim lOrigTop As Long

' Create a Word document object...
Set oWord = New Word.Application
Set oTmpDoc = oWord.Documents.Add

' Position Word off screen to avoid having document visible...
lOrigTop = oWord.Top
oWord.WindowState = 0
oWord.Top = -3000

Dim Index As Integer
Index = 1

' Assign the text to the document and check spelling...

For Index = 1 To 5
With oTmpDoc
.Content.Text = txtEEComment(Index)
.Activate
.CheckSpelling
End With
txtEEComment(Index).Text = Left(oTmpDoc.Content.Text, Len(oTmpDoc.Content.Text) - 1)
Next Index

' Close the document and exit Word...
oTmpDoc.Saved = True
oTmpDoc.Close

Set oTmpDoc = Nothing

oWord.Top = lOrigTop
oWord.WindowState = 2
oWord.Quit

Set oWord = Nothing
Set oTmpDoc = Nothing

MsgBox "Spell Check is complete", vbInformation + vbOKOnly
 
Sounds like you are referencing an activeX control or dll that exists on your windows 98 and 2000 but does not exist on your windows 95 box. It may be as simple as updateing the offending file.

Does the win95 machine have the same version of MS Office or MS Word as the other machines? If not that might be your problem. Thanks and Good Luck!

zemp
 
Yes, win95 machine have the same version of MS Office or MS Word as the other machines.

And I have checked the referrencing on Win95, I don't see any misssing referrencing.
 
Which line is the error occuring on?
Thanks and Good Luck!

zemp
 

creating word.applicaton si causing the error.

Set oWord = New Word.Application
Set oTmpDoc = oWord.Documents.Add
 
I did a key word searach for word.application for all forums and found over a dozen threads. They may be worth looking over.

Here's a start from Thread707-263355. Try leaving out the 'new' keyword.

Set oWordApp = Word.Application
or
Set oWordApp = CreateObject("Word.Application")


Thanks and Good Luck!

zemp
 
One other thing, you should direct people who would see you question is the Microsoft Active X forum to answer on this thread so that they are up to date with the status of your problem and don't spend time typing a response that has already been explored.

Thread194-381558 Thanks and Good Luck!

zemp
 
As Zemp says - don't multiple post!
Read the FAQ referred below to see why Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Alright, does anybody know how to even get that ActiveX Icon? I bought and installed Visual Basic 6: Learning Edition. Now when ever i click on New Project, My only options are "Standard EXE", "VB Application Wizard", and "VB Learning Edition Controls". Anybody know how i can get more icons? If you have that icon as an option, what version do you own? ANY help would be greatly appreciated. Thanks in advance.
 
gamersinc,

I believe that you need VB6 professional or enterprise edition to get the icons for the active X project and others. Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top