View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
DocBrown DocBrown is offline
external usenet poster
 
Posts: 119
Default Want to blank some cells when an AutoFilter is active.

Yes, I did debug this in that way. I verified that the rngCurrRow.Row and
colAccount had valid values. I even tried to use the immediate window to
figure out what Excel was complaining about. While at a break point in the
error handler, I executed this in the immediate window:

?ActiveSheet.Cells(rngCurrRow.Row, colAccount).address
$L$30
?activesheet.name
Budget Template

Then I did this in the immediate window:

ActiveSheet.Cells(rngCurrRow.Row, colAccount).value = ""

Sure enough, the 1004 error is displayed in a pop-up.

This is the worksheet I'm on and the cell that I expect to be updating. So,
to me this confirms that the code is doing exactly as I expected. And I'm on
the WS I expect.

Again, thanks for keeping me from missing something.

John S.

"OssieMac" wrote:

Hi again John,

You are right it is a bit difficult to follow your code through without the
source data to test with. However, now that you have specified the lines
where the code fails, turn off your error routines (comment them out) and let
the code fail and stop and when it does, Click Debug then hover the cursor
over the variables rngCurrRow.Row and colAccount and check their values.
(Ensure that you do not have values less than 1 in either of them.)

--
Regards,

OssieMac