View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
MichaelC MichaelC is offline
external usenet poster
 
Posts: 31
Default Debug RuntimeError 1004 in Chart

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))

Debug/Compile VBA Project runs clean.
I don't get it. My inherited stubborness is being tested.

"keepITcool" wrote:

OP stands for original poster.
it's meneer :) name of Jurgen

Formula may be ok BUT you must check the value
of rowvalue BEFORE attempting the offset
else you get a runtime 1004


If original range is on row 1
valid values for rowvalue are 12 thru 142 only,
giving offset from 495 thru 65495


Set EndPL = Sheets("Detail").Range("VarInput") _
.Offset((495 + (RowValue - 12) * 500), TradeAttribute + 12)

(495 + (RowValue - 12) * 500)




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


MichaelC wrote :

Thank you Steve and Meneer/Mevrouw Nederlander from the country my
parents came from.
I shall try both your suggestions in the morning PST and hope this
will slay the chart-dragon.
Does OP mean Operating Procedure? The formula problem ITCool refers
to is OK because of the difficult to see double parentheses - but
thanks for checking.
Michael