View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
kc-mass kc-mass is offline
external usenet poster
 
Posts: 12
Default Problem with Range reference - Odd error

Peter Great job. Solved my problem and taught me something.
You folks are always terrific, on point and responsive. A great resource!

Many Thanks
Kevin C


"Peter T" <peter_t@discussions wrote in message
...
typo -

Set srcRange = xlBook1.Worksheets(strSheet1).Range(Cells(2, 2),
Cells(lngBottom, 6))


You need to qualify .Cells

With xlBook1.Worksheets(strSheet1)
.Range(.Cells(2, 2), .Cells(lngBottom, 6))
End with


With xlBook1.Worksheets(strSheet1)
Set srcRange = .Range(.Cells(2, 2), .Cells(lngBottom, 6))
End with

Peter T

<snip