I have an issue whereby I am trying to specify a range name on the fly but I cannot seem to get it to work the way I want.
To make this clear, I do not want to use formula's or anything to do with CurrentRegion as my range name will commence from row 2 as the worksheet has headers.
Enclosed is my existing code:
'collect last row
lastrow = shtFrom.Cells(2).CurrentRegion.Columns(1).SpecialCells(xlCellTypeVisible).Count - 1
'Range("A2 " & L & lastrow).Select
csb_import = Range("A2:L & lastrow)
ActiveWorkbook.Names.Add Name:="csb_import", RefersTo:=csb_import
'allocate from range
Set rngFrom = Range("csb_import")
Any ideas to help appreciated guys?