Hi
try something like the following
Dim wks as worksheet
dim my_range as range
set wks = activeworkbook.worksheets("Sheet2")
set my_range=wks.range(cells(1,1),cells(n,1))
--
Regards
Frank Kabel
Frankfurt, Germany
This is what I need:
---------------------------
I am working in worksheet 1.I would like to declare a range called
My_Range in worksheet 2.
The cells that make up the range will be known only at run time. ie
My
range will have n number of rows where n will be determined when the
program runs.
How do i do this?
So far this is what I've done
-----------------------------------
Set My_Range = Range(Range("a1"), Range("a1").Offset(n))
This works but it selects the range from the current worksheet ie
sheet1.
When I try this:
--------------------
Set My_Range = Range(Worksheets.("sheet2").Range("a1"),
ksheets.("sheet2").Range("a1").Offset(n))
It gives me an error.
Help! I need to finish this asap for an assignment.
Pooja.
---
Message posted from http://www.ExcelForum.com/