View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default problem with excel??

It is the on Error statement

Your code is trying to read cells(65537,1) and getting an error try this
instead

While i <= 65536

if excsht.cells(i, 1).Value < "" then

end if
i = i + 1
On Error Resume Next
Wend


" wrote:

hello

i wrote a programm in VB which reads the data from an excel file and
insert them in a mdb database.

I wrote some code which when it found a blank line reads the next
sheet

when i want to count the line as below and change the sheet in row
65537 line it conitnues to add blank line after the 65536 line

Any Idea?

While excsht.cells(i, 1).Value < "" And i <= 65536

//commands

i = i + 1
On Error Resume Next
Wend