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! |
Neet to get range of newly added QueryTable
|
All times are GMT +1. The time now is 12:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com