Not at all sure, but my guess is that this line of code is the problem:
If my guess is correct, then you have 2 options for fiixing it.
1. put a dot (.) in from of Cells
so that VB knows it is referring to
otherwise, the WITH statement is not doing anything for you that I can see.
2. you did a very good job of referencing in this statement:
so, you could replace the line I think is causing you problems with
Let me know if that does not solve you problem and I'll look some more. Meanwhile a couple of other tips that might help make coding easier.
When you have a MsgBox with vbYesNo, you can check the response like this (for example) … Instead of
Use
You DO NOT need an Else statement with every IF … END IF. If you are not going to put anything between ELSE and END IF, then skip the ELSE.
Bookmarks