What is wrong in this code?
Please Login or Register to view this content.
What is wrong in this code?
Please Login or Register to view this content.
Either
Please Login or Register to view this content.
nothing wrong with that part, the error is with ws.rng.Select
error:
"Method or data member not found"
Last edited by JJGF; 06-14-2016 at 02:28 PM.
It should just be rng.Select but that will also fail unless ws is active.
What do you want to do with the range? It's seldom, if ever, needed to select a range to work with it.
If posting code please use code tags, see here.
Yes, it is one of the strange behavior of VBA
Please Login or Register to view this content.
Last edited by AB33; 06-14-2016 at 02:38 PM.
The range rng is not a property or method of the worksheet ws, it's an object variable that refers to a range on ws and it's parent is the worksheet ws.
ok, thanks for all the replies, I have to be away for next 10 hours.
Norie,
If ws is the parent of a range, should the sibling inherit its properties from its ancestor.? Or Inheritance does not work in VBA
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks