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: 2
Default How Do I Create a Range in Excel VBA?

I am trying to figure this one out. I want to create a range on a sheet. I
know the row and column numbers for the upper left and the bottom right. I've
tried the following without any luck but I think that I am close:

-- begin code --
sheetOfInterest = "Sheet1"
topRow = 5
topColumn = 6
bottomRow = 10
bottomColumn = 20

rem THIS DOES NOT WORK
newRange = ThisWorkbook.Worksheets(sheetOfInterest).Range(Cel ls(topRow,
topColumn), Cells(bottomRow, BottomColumn))
-- end code --

Once I get this working then I can get the rest done :).

Thanks,

Mike McCollister
 
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
How do I create button to printout worksheet range in excel 2007? apaicello Excel Discussion (Misc queries) 1 February 26th 10 08:26 PM
HOW CAN CREATE THE PRICE RANGE IN EXCEL 2003? TEJAS SHAH Excel Worksheet Functions 3 June 11th 09 01:19 PM
Using a Named Range to create routing slip in Excel [email protected] Excel Programming 0 January 8th 07 07:12 PM
How do I create a range of months in Excel? Mo Excel Discussion (Misc queries) 5 December 14th 04 06:05 PM
Create a Named Range in Excel with VBA GoKingBee Excel Programming 2 December 7th 04 08:13 PM


All times are GMT +1. The time now is 04:32 AM.

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

About Us

"It's about Microsoft Excel"