Free Support Forum -

Accessing range names!

I am using a template xls which i open , put some values and then save it with some other name. I have defined some named ranges in that template xls and i want that by code i could just replace the values of those ranges by using there names rather than specifying the exact cell index. can you please help me in that by giving some code snippet specifying how can i access those named ranges and replace there values.

I would also like to know that how can i remove the rows for those named ranges and shift the cells up.

Dear Ankur,

Please use Worksheets.GetRangeByName method to access named ranges and use Cells.DeleteRange method to remove rows.