[color=darkblue]Public[/color] Lastadd [color=darkblue]As[/color] [color=darkblue]String[/color]
[color=darkblue]Private[/color] [color=darkblue]Sub[/color] Workbook_SheetActivate([color=darkblue]ByVal[/color] Sh [color=darkblue]As[/color] [color=darkblue]Object[/color])
[color=darkblue]On[/color] [color=darkblue]Error[/color] [color=darkblue]Resume[/color] [color=darkblue]Next[/color]
Range(Lastadd).Select
[color=darkblue]End[/color] [color=darkblue]Sub[/color]
[color=darkblue]Private[/color] [color=darkblue]Sub[/color] Workbook_SheetSelectionChange([color=darkblue]ByVal[/color] Sh [color=darkblue]As[/color] [color=darkblue]Object[/color], [color=darkblue]ByVal[/color] Target [color=darkblue]As[/color] Range)
[color=darkblue]On[/color] [color=darkblue]Error[/color] [color=darkblue]Resume[/color] [color=darkblue]Next[/color]
Lastadd = Target.Address
[color=darkblue]End[/color] [color=darkblue]Sub[/color]