Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Debug error 1004 | Excel Discussion (Misc queries) | |||
excel chart export error runtime 1004 | Charts and Charting in Excel | |||
Run-time error '1004' unable to get the ChartObjectsproperty of the Chart class | Excel Programming | |||
Error '1004' (Method 'Cells' of '_Global' Failed) On chart creation? | Excel Programming | |||
tuntime-error 1004 when trying to rescale a chart | Excel Programming |