Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default runtime error -429

I have an office application the uses excel, word, and outlook to email 10-15
clients a week.

This application worked this morning, but I now get the following error
while running vba code from excel:

Run-time error "429"
Axtive X component can't create object

The offending line of code is:

Set wdApp = GetObject(, "Word.Application")

I did go into system restore to move the system back to yesterday, yet I
still get the same problem. I did install the Office xp3 update this
morning, so that may have something to do with the problem.

Any help is appreciated.

skibikegolf


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default runtime error -429

Hi
Try this. Your code, as is, will fail if Word is not already open.

On Error Resume Next
Err.Clear
Set wdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then WordWasRunning = False Else
WordWasRunning = True
On Error GoTo 0
Err.Clear 'keep err tidy
If Not WordWasRunning Then
Set wdApp = CreateObject("Word.Application") 'fresh version
of Word
End If

regards
Paul

skibikegolf wrote:
I have an office application the uses excel, word, and outlook to email 10-15
clients a week.

This application worked this morning, but I now get the following error
while running vba code from excel:

Run-time error "429"
Axtive X component can't create object

The offending line of code is:

Set wdApp = GetObject(, "Word.Application")

I did go into system restore to move the system back to yesterday, yet I
still get the same problem. I did install the Office xp3 update this
morning, so that may have something to do with the problem.

Any help is appreciated.

skibikegolf


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default runtime error -429

Paul,

Thanks for the suggested code, I do have similar code:

Set wdApp = GetObject(, "Word.Application")
If Err < 0 Then 'Word was not running
Set wdApp = CreateObject("Word.Application")
aStarted = True
End If

However, what is interesting, all of a sudden my code is again running fine
with no runtime errors. Should I be scared :-)

skibikegolf

" wrote:

Hi
Try this. Your code, as is, will fail if Word is not already open.

On Error Resume Next
Err.Clear
Set wdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then WordWasRunning = False Else
WordWasRunning = True
On Error GoTo 0
Err.Clear 'keep err tidy
If Not WordWasRunning Then
Set wdApp = CreateObject("Word.Application") 'fresh version
of Word
End If

regards
Paul

skibikegolf wrote:
I have an office application the uses excel, word, and outlook to email 10-15
clients a week.

This application worked this morning, but I now get the following error
while running vba code from excel:

Run-time error "429"
Axtive X component can't create object

The offending line of code is:

Set wdApp = GetObject(, "Word.Application")

I did go into system restore to move the system back to yesterday, yet I
still get the same problem. I did install the Office xp3 update this
morning, so that may have something to do with the problem.

Any help is appreciated.

skibikegolf



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default runtime error -429

Hi
Some thoughts:
1. did you set wrdApp to nothing at the end (plus the other word
objects in the right order)
2. Did you clean your code using Rob Bovey's code cleaner:
http://www.appspro.com/Utilities/CodeCleaner.htm

This can often clear up mysterious glitches.
regards
Paul


skibikegolf wrote:
Paul,

Thanks for the suggested code, I do have similar code:

Set wdApp = GetObject(, "Word.Application")
If Err < 0 Then 'Word was not running
Set wdApp = CreateObject("Word.Application")
aStarted = True
End If

However, what is interesting, all of a sudden my code is again running fine
with no runtime errors. Should I be scared :-)

skibikegolf

" wrote:

Hi
Try this. Your code, as is, will fail if Word is not already open.

On Error Resume Next
Err.Clear
Set wdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then WordWasRunning = False Else
WordWasRunning = True
On Error GoTo 0
Err.Clear 'keep err tidy
If Not WordWasRunning Then
Set wdApp = CreateObject("Word.Application") 'fresh version
of Word
End If

regards
Paul

skibikegolf wrote:
I have an office application the uses excel, word, and outlook to email 10-15
clients a week.

This application worked this morning, but I now get the following error
while running vba code from excel:

Run-time error "429"
Axtive X component can't create object

The offending line of code is:

Set wdApp = GetObject(, "Word.Application")

I did go into system restore to move the system back to yesterday, yet I
still get the same problem. I did install the Office xp3 update this
morning, so that may have something to do with the problem.

Any help is appreciated.

skibikegolf




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error: syntax error or access violation oucsester[_2_] Excel Programming 1 May 3rd 06 05:51 PM
runtime error: syntax error or access violation oucsester Excel Programming 0 May 3rd 06 02:22 PM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"