Article ID: 111281
Article Last Modified on 10/11/2006
'The Test1 subroutine will fail if the name "Test1" does not already
'exist in the workbook.
Sub Test1()
ActiveWorkbook.Names.Add Name:="Test1", _
RefersToR1C1:="=Sheet1!R1C1:R10C10"
End Sub
'The Test2 subroutine runs the MakeName subroutine, which attempts to
'define the name "Test2". As with the above subroutine, it will fail if
'the name "Test2" does not already exist in the workbook.
Sub Test2()
MakeName 'runs the Test2 subroutine
End Sub
Sub MakeName()
ActiveWorkbook.Names.Add Name:="Test2", _
RefersToR1C1:="=Sheet1!R1C1:R10C10"
End Sub
Additional query words: 5.00a 5.00c routine XL5
Keywords: kbbug kbfix kbprogramming kbcode KB111281