The following code works if the selected cell in within the first named range (columns B:J) but if I try putting the activecell in the next named range (columns K:S) an error occurs "object variable or with block variable not set". What I am trying to do is determine which named range the selected cell is in. If it isn't in any of the 5 named ranges then execute the code section that the activecell isn't in any of the 5 specified named ranges. Why does it work in the first case if the activecell in in that range but fails if I try putting the active cell within the next named range. I am doing entire columns for named ranges so Line1Cols are B:J, Line2Cols is defined as K:S and so on.
Bookmarks