The code below hangs on the "If Not Intersect(Target, Range("A4:A" & Lastrow)) Is Nothing Then" line. I'm not sure why it's not taking it.
![]()
Please Login or Register to view this content.
The code below hangs on the "If Not Intersect(Target, Range("A4:A" & Lastrow)) Is Nothing Then" line. I'm not sure why it's not taking it.
![]()
Please Login or Register to view this content.
Hi
Does the variable Lastrow actually have anything in it? I'm not sure that the auto_open macro will have run when the workbook was opened.... I think it has to be in a general module. If you want the event, then it has to be on the workbook code sheet, and is workbook_open.
rylo
I moved
to the ThisWorkbook module, saved everything, closed it, opened it with macros enabled, and I'm still getting the error for the same line.![]()
Please Login or Register to view this content.
![]()
Hi
Can you check that lastrow actually does have something in it, and what that number is.
rylo
Fixed it. :D
I moved
into a standard code module (per http://www.cpearson.com/excel/codemods.htm)![]()
Please Login or Register to view this content.
Achhhh
Should have noticed that!!! Comes from looking at the code, not where the code would have been located.
Must put that into my mental "thing to always check" list when reviewing code snips.
rylo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks