rrrprogramer
01-07-2010, 04:35 PM
I am using VBA and Excel 2003.
I have an Excel file that contains data that could be 10 or 100 rows of data or more.
In a text file, I usually check for EOF and read the line
ex: Do While Not EOF(1) )
Line Input #1, strRec
Loop
However, I'm not sure the code for Excel .
Basically, how do I read an Excel file and how does the loop look like for Excel file? Any ideas?
After I open the Excel file using VBA code,
dim wbk as Workbook
Set wbk = Workbooks.Open("Myfile.xls", False)
wbk.Activate
wbk.Worksheets("Sheet1").Activate
I have an Excel file that contains data that could be 10 or 100 rows of data or more.
In a text file, I usually check for EOF and read the line
ex: Do While Not EOF(1) )
Line Input #1, strRec
Loop
However, I'm not sure the code for Excel .
Basically, how do I read an Excel file and how does the loop look like for Excel file? Any ideas?
After I open the Excel file using VBA code,
dim wbk as Workbook
Set wbk = Workbooks.Open("Myfile.xls", False)
wbk.Activate
wbk.Worksheets("Sheet1").Activate