I want to set a Row as a variable

  • Hi guys,


    First of all thank you for your help.


    Im new at this but I need to complete one project and this is the only thing that I couldnt do


    I need to set a Row as a variable that I can use later


    For example:


    After the Macro find a specific cell


    Selection.EntireRow.Select


    That row I need to set as a variable to later use in the print title rows


    Application.CutCopyMode = False

    = False

    With ActiveSheet.PageSetup

    .PrintTitleRows = "$2:$3"


    Any idea that can help me?

  • You say "After the Macro find a specific cell"

    Code
    1. Sub AAAAA()
    2. Dim s As Range
    3. Set s = Sheets("Sheet1").Columns(1).Find(Range("H1").Value,,,1) '<---- Or whatever you want to find wherever
    4. 'Do whatever you want to do
    5. s.EntireRow.Select
    6. End Sub