Forum Discussion

chowell97's avatar
chowell97
Copper Contributor
Feb 26, 2023
Solved

Select active row of excel sheet using ListObject code

Hello,   Building off of a previous discussion.   I have an excel sheet that is used as a template to create additional sheets in an excel workbook. This sheet has a table named Master_Template....
  • HansVogelaar's avatar
    HansVogelaar
    Feb 26, 2023

    chowell97 

    Try this:

        Dim Hdr As Range
        Dim MyRow As Long
        Set Hdr = Range(Tbl.ListColumns("TYPE").Range(1), Tbl.ListColumns("LICENSE FLAG").Range(1))
        MyRow = ActiveCell.Row - Tbl.Range.Row
        Hdr.Offset(MyRow).Copy Destination:=Hdr.Offset(200)

Resources