Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
XL2003 I am having trouble using a named range in a macro, even after refering the Help. The named range lives in the active workbook on another sheet. My code is this: Private Sub Worksheet_Activate() With [CompNames] Set c = .Find(Range("A1")) If Not c Is Nothing Then A = Sheets("Names").Cells(c.Row, 3) End With If ActiveSheet.Name < A Then ActiveSheet.Name = A End Sub You will see that I have had to resort to using [ ] around the named range, which is the only way I could get the code to run. I tried Range("CompNames") and Range(CompNames) and tried including the sheet name and the workbook name, but none of those worked. What am I doing wrong? Regards - Dave. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Refer to a named range indirectly | Excel Worksheet Functions | |||
refer to a named range in this.workbook | Excel Programming | |||
???Refer to a specifc cell in a named range | Excel Worksheet Functions | |||
How does one refer to the n-1 element of a named range? | Excel Discussion (Misc queries) | |||
How do you refer to a dynamic named range? | Excel Programming |