how do i write the code in vb6 in finding the EOF of excel file
can anyone help me?
i try to code this and it works..
--->
Dim excelApp as Excel.Application
Dim excelWB as Excel.Workbook
Set excelApp = New Excel.Application
Set excelWB = excelApp.Workbooks.Open("D:\Book1.xls")
Dim xlsRow as Long
Dim EOF as Boolean
xlsRow = 1
Do While (EOF = False)
If (excelWB.Sheets("Sheet1").Cells(xlsRow, 1).Value = "") Then
EOF = True
Else
xlsRow = xlsRow + 1
End If
Loop
<---
this code is working, but the only problem is only the column 1 will be checked and the others is not. Can anyone help me on how to improve this code to check all rows and column of excel cells