I have a few Public functions that are called on in order in another function... Something like this:
Public Sub func1()
Operation 1
End Sub
Public Sub func2()
Operation 2
End Sub
Public Sub func3()
Operation 3
End Sub
Sub Execute()
Call func1()
Call func2()
Call func3()
End Sub
What I would like to understand is if there is a common variable that I am declaring in each of these functions, something like this:
Dim LastRow as Long
LastRow = Sheets("Project_Name").Cells(Rows.count, "B").End(xlUp).row
Is it safe to assume that I can declare it once in func1() and use it in both func2() and func3()?
Or I have to declare it 3x times in each of these functions?
Thanks