Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Debug RuntimeError 1004 in Chart

Steve, George and Jurgen - I finally got it to work. Thanks for staying with
me all this time. For the benefit of those other novices who get floored by
the mysteries of coding, here is the code that finally worked for me:

RowValue = ActiveCell.Row
ColumnValue = ActiveCell.Column
TradeAttribute = Sheets("Control").Cells(11, ColumnValue)
If RowValue < 12 Then Exit Sub

With Worksheets("Detail")
Set BeginInput = Range("VarInput").Offset((RowValue - 12) * 500,
TradeAttribute)
Set EndInput = Range("VarInput").Offset(495 + ((RowValue - 12) * 500),
TradeAttribute)
Set BeginPL = Range("VarInput").Offset(((RowValue - 12) * 500),
TradeAttribute + 12)
Set EndPL = Range("VarInput").Offset((495 + (RowValue - 12) * 500),
TradeAttribute + 12)
Set InputData = Range(BeginInput, EndInput)
Set PLData = Range(BeginPL, EndPL)
End With
ActiveSheet.ChartObjects("ChartInteger").Select

"keepITcool" wrote:



the cells are NOT qualified THUS refer to activesheet
the Range is qualified thus refers to Details..
better to reverse or qualify all..

With worksheets("Detail")
set inputdata = .Range( _
.Cells(BeginInput,1),
.Cells(EndInput,1))
end with



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


MichaelC wrote :

Wel bedankt, Jurgen - I have added an "If Then" statement to exit the
Sub if RowValue < 12.
But I still get a runtime error 1004 at the statement:

Set InputData = Sheets("Detail").Range(Cells(BeginInput, 1),
Cells(EndInput, 1))



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
Debug error 1004 Kasper Excel Discussion (Misc queries) 7 January 27th 09 02:21 PM
excel chart export error runtime 1004 Mau Charts and Charting in Excel 3 August 17th 05 11:35 AM
Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class msk19 Excel Programming 1 July 2nd 04 06:59 PM
Error '1004' (Method 'Cells' of '_Global' Failed) On chart creation? NooK[_12_] Excel Programming 5 June 28th 04 07:21 AM
tuntime-error 1004 when trying to rescale a chart Rainer[_2_] Excel Programming 1 May 17th 04 10:45 PM


All times are GMT +1. The time now is 04:52 AM.

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

About Us

"It's about Microsoft Excel"