Sort of but it's a REALLY BAD IDEA. So long as you do not have "Option
Explicit" at the top of the code module you are not required to declare your
variables.
VB will create varaibles on the fly for you. The variables created
are of type Variant. So you could just write (without the dim statement).
FinalRow = ActiveSheet.Range("A65536").End(xlUp).Row
When this line of code executes the compiler will create FinalRow for you as
a variable of type variant. I can not stress this enough that doing this is
an EXTREMELY BAD IDEA. DON'T DO IT. That being said it is possible.
--
HTH...
Jim Thomlinson
"mpeplow" wrote:
Is there any way to put this in one statement?
Dim FinalRow As Variant
FinalRow = ActiveSheet.Range("A65536").End(xlUp).Row
--
mpeplow
------------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812
View this thread: http://www.excelforum.com/showthread...hreadid=562555