View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Delete Row If OracleID = Value

How would we know what to expect iLastRow to be, we cannot see the data.

Cells(Rows.Count, "A") just finds the last row in the worksheet, then
..End(xlUp) moves up to the previous (i.e. very last) data row, .Row gets
that row number.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Connie" wrote in message
oups.com...
Thanks for your help. I'm still not able to get this to work. The
ilastrow returns a value which is not the last row in the range. Also,
a delete takes place, but it takes place from the sheet from which the
command button was called, and not the "Upload Data" sheet.

Help!

Here's the data I'm using. Should I not expect ilastrow to equal 29?
Also, what does Cells(Rows.Count, "A") mean? Thanks again.




kounoike wrote:
Sorry, my if clause never happen in your code.

"kounoike" wrote in message
...
Well, I understand, if the lastrow is in autofilter range.

keizi

"Bob Phillips" wrote in message
...
It is. Couldn't have had a problem in the tests as it just extended

the
range to 2 & iLastRow, so if iLastrow was 72, it would set it to 272,

not
a
problem, just a waste.

--
HTH