View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David Messenger David Messenger is offline
external usenet poster
 
Posts: 11
Default Issue with With statement

Copied your code into my own version and it doesn't appear to like having D1
or D2 empty. If these are empty using xldown sends it to Row 65536 (the
bottom) and then trying to move down 1 row (by the offset) takes it out of
the scope of the sheet.

If these Cells are populated do not get the error message.

"robs3131" wrote:

Similar to another post I had put up today, I am now trying to "With" to
qualify my statements. However, the code below gives me the "Run Time error
'1004': Application-defined or object defined error" error...any idea why?

With Sheets("Open Transactions")
.Range("D1").End(x1Down).Offset(1, 0).value = A.value
End With

--
Robert