Hello,
I am wondering how I can add my lRow as a public const so I don't have the same code in every module doing the same thing
This is what I am using to get my last row used and works great.
I am hoping to add this as a Public const so all I have to do is just add lRow to whatever cell or range I am working on at the time.
I've tried this
But vba doesn't like that. it highlights the .Row for some reason.
Thank you in advance.
I am wondering how I can add my lRow as a public const so I don't have the same code in every module doing the same thing
This is what I am using to get my last row used and works great.
Code:
Dim lRow As Long
lRow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row + 1
I am hoping to add this as a Public const so all I have to do is just add lRow to whatever cell or range I am working on at the time.
I've tried this
Code:
Public Const lRow As Long = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row + 1
Thank you in advance.