hi all,
I have tried to use the "Workbook_SheetDeactivate(ByVal Sh As Object)".
the reason I want to use it is to be able to switch from current sheet to the previous one.
so what I did was declaring "lastsheet" variable : Public LastSheet As Worksheet
then I used this in "ThisWorkbook" module :
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Set LastSheet = Sh
End Sub
the problem is that I don't know what to do next. every time I declaring a new subroutine and use Lastsheet.select then I get an error when calling this sun within a Macro.
so, what am I doing wrong? is there an easier way? or any other working way ?![]()
thank you very much.
Bookmarks