problem with excel??

  • Thread starter Thread starter kapellakis
  • Start date Start date
K

kapellakis

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top