It seems that the problem is in the Dim statement.
On testing Err.Number, it's usually 1004, but when stepping through the code looking for a named range which I KNOW exists, I got Err.Number = 13 (type mismatch). I changed the "Dim rngTest as Range" to "Dim varTest as Variant", and everything...
P.S. I know the Function name is really "NamedRangeExists" - I was part way through modifying the names when I posted this query.
Steve
There's nothing quite so rare as common sense!
I want to populate portions of a Word 2010 document by copying in data from an Excel 2010 spreadsheet.
I can happily open the spreadsheet within the VBA in Word, and I can copy in the data, but what I now want to do is to only copy in the data if it exists as a specifically named range in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.