Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Neet to get range of newly added QueryTable

set rng Excel.ActiveSheet.Range("B7").CurrentRegion.column s(1).cells
msgbox rng(rng.count).Row


or

Excel.Activesheet.Range("B7").End(xldown).Row

will give you the last contiguous filled cell. Assumes no blank cells If
there is nothing under the data and you may have blank cells

Excel.Activesheet.Range("B65536").End(xlup).Row

but this assumes the last row has data in column b.

--
Regards,
Tom Ogilvy


SeaCat wrote in message
...
I imported some text file into ActiveSheet like this:

QueryTables.Add
(Connection:= "TEXT;http://localhost/test.txt",
Destination:= Excel.ActiveSheet.Range("B7") )

How can I get the range of imported data, which depends on
actual lines of the text file? Thanks!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Neet to get range of newly added QueryTable

or you can use
Range("b7").QueryTable.ResultRang

--
Message posted from http://www.ExcelForum.com

Reply
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
automatically appending newly added data on worksheet to a master list worksheet tabylee via OfficeKB.com Links and Linking in Excel 0 December 17th 09 04:24 PM
subtract a range from an added range Marge Excel Discussion (Misc queries) 2 November 20th 08 10:09 PM
Neet to use Excel to read in multiple-sheet file VMetze Excel Worksheet Functions 2 June 29th 06 08:14 PM
how do i get the name of a newly added sheet that i add with Sheets.Add in a vba macro in excel? Daniel Excel Worksheet Functions 1 June 23rd 05 07:28 PM
Add Hyperlink to newly added worksheet? onliner Excel Programming 3 August 13th 03 02:04 AM


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