LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Declaring a Range Object

This is what I need:
---------------------------
I am working in worksheet 1.I would like to declare a range calle
My_Range in worksheet 2.

The cells that make up the range will be known only at run time. ie M
range will have n number of rows where n will be determined when th
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 i
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Declaring as Object rather than Excel.Worksheet R Avery Excel Programming 3 January 6th 04 11:44 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"