Replace Address of currently ActiveCell with Address of "A" & (ActiveCell.Row)

  • Running below code while on Sheet1. In blue line below need to somehow make a reference to Address of Range("A" & (ActiveCell.Row)).Value rather than to currently active cell:

    Sub CheckIfNameChange()
    Dim VarX As String
    [COLOR=#0000FF]VarX = Sheet4.Range(ActiveCell.Address).Value[/COLOR]
    If VarX <> Range("A" & ActiveCell.Row).Value Then 
            Call RenameFile
        End If
    End Sub
  • Currently the blue line in my code above refers to a cell on different Sheet with same address as active cell. Objective is for it to refer to a cell on different Sheet on the intersection of Column A and same row as active cell on active sheet.

Participate now!

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