LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Runtime Error '1004' Method 'ActiveChart' of Object '_Global' failed

I've read many similar posts on this subject but it seems this error
can have many different causes. I've created an Access DB that
generates Excel reports (Requirement). It happens on every other
report (Same rpt) beginning with the second one, it only corrects
itself though if press 'END' when the error message comes up. I've
noticed a symptom that tells me this error is going to occur and I
close the Excel file before it finishs and gets to the code that causes
the error. Below is the indication I'm going to get the error:


objRptWS.Activate
objRptWS.Range(objRptWS.Cells(5, 20), objRptWS.Cells(5,
21)).Select
With .Shapes(strBox1).TextFrame
.Characters.Text = " "
objRptWS.Shapes(strBox1).Select
ExecuteExcel4Macro "FORMULA(" & strJudge1 & ")"
.Characters.Font.Size = 12
.Characters.Font.NAME = "ToyotaKV"
.Characters.Font.Bold = True
.HorizontalAlignment = xlHAlignCenter
End With

Every other time is when it kind of skips the ExecuteExcel4Macro line
and does put the formula into the box. This is the indication however
the error happens later on in the code (The code itself is pretty long
so just including snippets if anyone needs more of the code to help me
please let me know). That code is:

For Each objChart In objRptWS.ChartObjects
If StrComp(objChart.NAME, "Chart 1") < 0 Then
objRptWS.ChartObjects(objChart.NAME).Activate
ActiveChart.Axes(xlCategory).Select
Selection.TickLabels.Orientation = 90
Set objChart = Nothing
End If
Next objChart

The ActiveChart statement is the one the debugger highlights as the
culprit. Any help would be greatly appreciated

 
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
Error 1004 Method 'Range' of object '_Global' failed bjwade62 Excel Programming 4 August 7th 06 03:57 PM
runtime error 1004 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM
runtime error '1004' object '_Global' failed Jim in Spokane[_2_] Excel Programming 0 August 3rd 05 12:16 AM
Runtime Error 1004 - Method Range of '_Global failed' Sworkhard Excel Programming 3 July 9th 04 04:20 AM
Error 1004: Method 'Cells' of object '_Global' failed LT Excel Programming 2 October 31st 03 04:47 PM


All times are GMT +1. The time now is 03:30 AM.

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"