Hi Baphony
First comment : avoid using .Activate and .Select as it slows down your code. Most of the time you don't need to use it.
Here's an example, if I understood well :![]()
Sub supplierdefine1() Dim rng As Range With Sheets("VendorsInCosts") Set rng = .Range("A1:A" & .Range("A65535").End(xlUp).Row + 1) ActiveWorkbook.Names.Add Name:="suppliercostslist", RefersTo:=rng End With 'Example : Dim rg As Range Set rg = Sheets("Vendor").Range("A2").Resize(WorksheetFunction.CountA(Sheets("PartsList").Columns("A:A")), 11) ' Just to verify the ranges address in the Execution pane Debug.Print rg.Address Debug.Print rng.Address End Sub
Bookmarks