Thebatfink
Active Member
- Joined
- Apr 8, 2007
- Messages
- 410
Hi, I'm using the code below to find the row number I want
But it always gives me the row number of the first sheet in the work book..
I've tried
etc etc but I can't see to make it look at the workbook and sheet I want. Everything else I ever do ussually works fine but obviously theres a reason its defaulting to this work sheet and not my intended one.. I just don't know what it is (I'm doing this from a different worksheets code window but I have tried it in a module and it still doesn't want to play ball)..
Any help would be greatly appreciated.
Thanks
Batfink!
Code:
With Worksheets("Compiled Sheets")
lastrow = Cells.Find(What:="*", searchorder:=xlByRows, _
searchdirection:=xlPrevious).Row
End With
But it always gives me the row number of the first sheet in the work book..
I've tried
Code:
Workbooks("name").Sheets("name").Activate
Code:
Workbooks("name").Sheets("name").Select
etc etc but I can't see to make it look at the workbook and sheet I want. Everything else I ever do ussually works fine but obviously theres a reason its defaulting to this work sheet and not my intended one.. I just don't know what it is (I'm doing this from a different worksheets code window but I have tried it in a module and it still doesn't want to play ball)..
Any help would be greatly appreciated.
Thanks
Batfink!
Last edited: