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: 4
Default Select and copy a variable range

In the following code is it possible to use the actual number of
filled-in rows instead of hard-coded maximum of 15,000?

Workbooks.Open FileName:=sDbf
Range("2:15000").Select
Selection.Copy
Destination:=ThisWorkbook.Sheets(sWSName).Range("2 :15000")
ActiveWorkbook.Close

May be something with Rows.Count?

If it matters I'm working with Excel 2002.

TIA, Eugene
 
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
Select a variable range Bluecat Excel Worksheet Functions 7 January 13th 09 01:24 AM
Select variable range ewan7279 Excel Programming 1 September 5th 07 09:46 AM
Select a variable range Eduardo Excel Programming 7 August 8th 07 01:46 PM
Use a Variable to select a range Connie Excel Discussion (Misc queries) 3 October 19th 06 05:48 PM
select a variable range evil baby[_15_] Excel Programming 4 March 8th 06 08:38 PM


All times are GMT +1. The time now is 08:05 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"