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
    Sub AAAAA()
    Dim s As Range
    Set s = Sheets("Sheet1").Columns(1).Find(Range("H1").Value,,,1)   '<---- Or whatever you want to find wherever
    
    
    'Do whatever you want to do
    
    
    s.EntireRow.Select
    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!