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 Reading Entire Range

I have multiple workbooks with one sheet in them named Sheet1.
There is only one column filled with data, 'A'
The rows in column A are filled with text data.
I never know how many cells are in column 'A'.

How do I create a loop that goes through the entire range?

Here is my code that doesn't loop:

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet1 As Excel._Worksheet
Dim mytext1 As String


xlApp = CreateObject("Excel.Application")
xlBook = xlApp.Workbooks.Open("C:\MyXLS.xls")
xlSheet1 = xlBook.Worksheets(1)

mytext1 = xlssheet1.range("A1").value 'I need all the values in A




xlBook.Close()
 
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
When entering data into a range of cells, select the entire range. Q Excel Discussion (Misc queries) 0 September 26th 07 04:36 AM
Excel2000: Reading Named Range value from VBA Arvi Laanemets Excel Programming 2 July 9th 04 09:01 AM
Range.Formula in Excel 2003 gives Error reading formulas just below 1024 bytes Frank Jones Excel Programming 14 July 9th 04 06:25 AM
Reading a Range Pablo Excel Programming 2 June 4th 04 02:59 PM
Reading a named range Karl Thompson Excel Programming 1 July 10th 03 02:29 AM


All times are GMT +1. The time now is 03:40 PM.

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"