Posted to microsoft.public.excel.programming
|
|
VBA question - Type Mismatch
Which is better IMO
Bob
"Dave Peterson" wrote in message
...
I think Bob gave you the answer, but you could use "A", too:
And I think I'd do:
Dim LastRow As Long
Just in case it's a big number (32k).
Dim LastRow As Long
with activesheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
end with
and one mo
workbooks(activeworkbook.name)
is equivalent to
activeworkbook
"ajliaks <" wrote:
Plz,
I am trying to use this, but getting error!
I need to get the last active row in the active sheet
Dim LastRow As Integer
LastRow =
Workbooks(ActiveWorkbook.Name).Worksheets(ActiveSh eet).Cells(Rows.Count,
"1").End(xlUp).Row
May be its because of the "1" ???
Thanks.
---
Message posted from http://www.ExcelForum.com/
--
Dave Peterson
|