Nope. It's equivalent to:
sheet2.Range(sheet2.Cells(1), sheet2.Cells(100, 100)) = Matrix
or
sheets(2).Range(sheets(2).Cells(1), sheets(2).Cells(100, 100)) = Matrix
Each range reference (.range() and .cells()) has to be qualified.
4N wrote:
>
> I used
> With Sheets(2)
> .Range(.Cells(1), .Cells(100, 100)) = Matrix
> End With
>
> and I ended up having the earlier mentioned error.
> I guess the above commands are equivalent to
> sheet2.Range(.Cells(1), .Cells(100, 100)) = Matrix
>
> and that doesn't work without activating the sheet.
> That isn't a big deal anyway...
>
> "RB Smissaert" <(E-Mail Removed)> ha scritto nel messaggio
> news:%(E-Mail Removed)...
> > You don't have to activate the sheets. You can do:
> >
> > With Sheets(x)
> > .Range(.Cells(1), .Cells(100, 100)) = Matrix
> >
> > Matrix = .Range(.Cells(1), .Cells(100, 100))
> > End With
> >
> > I don't think you can get a part of an array without
> > running a loop.
> >
> >
> > RBS
--
Dave Peterson
|