Hi guys,
Please, look at the codes below:
My worry? Each time I run the Workbook_Open() procedure, I see a new name in the Name Box. See attached image. Do these names represent different range objects or are they different names for the same range object?Option Explicit Dim rangeCounter As Long Public Sub DefineSuperRange() dim superRange as range rangeCounter = rangeCounter + 1 Set superRange = Worksheets("Sheet1").Range("A10:D1000") With SuperRange .HorizontalAlignment = xlRight .ColumnWidth = 10 .NumberFormat = "###0.00;-###0.00" .Name = "Range" & rangeCounter & "Range" & rangeCounter - 1 'Give focus to the first cell of the mainRange .Cells(2, 1).Select End with End Sub Private Sub Workbook_Open() 'Define the super range of data Call DefineSuperRange end sub