I'd like to define names for 52 cells and do it with one array. I recorded the naming of one range and learned the .Names.Add Name:= notation so I'm wondering can that be combined with an array. I'm getting a 438 object error when I try the following - any ideas?
Code:
Sub TestNameArray()
With ActiveWorkbook.Sheets("Summary FOT")
.Range("BH124:DG124").Names.Add Name:=Array("MCTSI2AKNewImportL1", "MCTSI2ALNewImportL1", "MCTSI2ARNewImportL1", "MCTSI2AZNewImportL1", "MCTSI2CANewImportL1", "MCTSI2CONewImportL1", "MCTSI2CTNewImportL1", "MCTSI2DCNewImportL1", "MCTSI2DENewImportL1", "MCTSI2FLNewImportL1", "MCTSI2GANewImportL1", "MCTSI2HINewImportL1", "MCTSI2IANewImportL1", "MCTSI2IDNewImportL1", "MCTSI2ILNewImportL1", "MCTSI2INNewImportL1", "MCTSI2KSNewImportL1", "MCTSI2KYNewImportL1", "MCTSI2LANewImportL1", "MCTSI2MANewImportL1", "MCTSI2MDNewImportL1", "MCTSI2MENewImportL1", "MCTSI2MINewImportL1", "MCTSI2MNNewImportL1", "MCTSI2MONewImportL1", "MCTSI2MSNewImportL1", "MCTSI2MTNewImportL1", "MCTSI2NCNewImportL1", "MCTSI2NDNewImportL1", "MCTSI2NENewImportL1", "MCTSI2NHNewImportL1", "MCTSI2NJNewImportL1", "MCTSI2NMNewImportL1", "MCTSI2NVNewImportL1", "MCTSI2NYNewImportL1", "MCTSI2OHNewImportL1", "MCTSI2OKNewImportL1", "MCTSI2ORNewImportL1", "MCTSI2PANewImportL1", "MCTSI2RINewImportL1", "MCTSI2SCNewImportL1", _
"MCTSI2SDNewImportL1", "MCTSI2TNNewImportL1", "MCTSI2TXNewImportL1", "MCTSI2UTNewImportL1", "MCTSI2VANewImportL1", "MCTSI2VTNewImportL1", "MCTSI2WANewImportL1", "MCTSI2WINewImportL1", "MCTSI2WVNewImportL1", "MCTSI2WYNewImportL1", "MCTSI2oTHERNewImportL1")
End With
End Sub