Dear Grup, '---naming a range, example
Dim NotCtr1 As Range Dim IsSameRange as Boolean Set NotCtr1 = Range("A1:C2") Range("A1:C2").Name = "Ctr1" '---refering a named range, example Range("Ctr1").interior.ColorIndex = 16 IsSameRange = (NotCtr1 = Range("Ctr1")) MsgBox IsSameRange On Feb 25, 10:36 am, Harpreet Singh Gujral <harpreetguj...@gmail.com> wrote: > Hi Group, > > In order to name ranges i use the following code: > > ActiveWorkbook.Names.Add Name:="Ctr1", RefersToR1C1:= _ > Strshtname & "R1C1:R2C3" > > It uses R1C1 referrencing, can we use the other referrencing for this code > > Thanks > > Harpreet Gujral -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe