Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
Excel2000: Reading Named Range value from VBA | Excel Programming | |||
Range.Formula in Excel 2003 gives Error reading formulas just below 1024 bytes | Excel Programming | |||
Reading a Range | Excel Programming | |||
Reading a named range | Excel Programming |