View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default How come this range definition is invalid?

Hi Thanks

cells(5,icol) has no defined parent.

un unspecified Range's parent whould default to _Global being the
Activesheet in Activeworkbook

for cells it won't work, but you might do it like

With worksheets("Boasting")
set rngCumAMile = .range(.cells(5,icol),.cells(22,icol))
end with

<bg

Greetz, All

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?bHV2Z3JlZW4=?=" wrote:

Greetings all.

I got the error "Application-defined or object-defined error" of the
range definition below.

Set rngCumMile = Worksheets("Individual View").Range(Cells(5, iCol),
Cells(22, iCol))

Any advice? Thanks.