All,
I am trying to write a simple piece of code and across multiple procedures, I'm trying to find the bottom row of a range (e.g.
I'm not having any troubles with this. My question is that to simplify the code, and to speed up changes, is there a way I can make a global variable (e.g. mlBottomRow) at the initial declaration AND set the value? For example:
I know in variable scope, I can dimension the variable and type. I'm just unclear on actually setting the value outside a procedure.
Thanks for your help!
-Fuzzy
I am trying to write a simple piece of code and across multiple procedures, I'm trying to find the bottom row of a range (e.g.
Code:
Cells(65536, 1).End(xlUp).Row
I'm not having any troubles with this. My question is that to simplify the code, and to speed up changes, is there a way I can make a global variable (e.g. mlBottomRow) at the initial declaration AND set the value? For example:
Code:
Option Explicit
Dim mlBottomRow as Long
mlBottomRow = 65536
Sub Procedure1()
Code...
End sub
Sub Procedure2()
Code...
End sub
I know in variable scope, I can dimension the variable and type. I'm just unclear on actually setting the value outside a procedure.
Thanks for your help!
-Fuzzy