Use the Worksheet_Activate & Deactivate events.

http://www.excel-it.com/Forum/viewtopic.php?t=11

This code will load UserForm1 as the sheet is activated, and hide or unload it when the sheet is deactivated

Option Explicit

Private Sub Worksheet_Activate()
UserForm1.Show
End Sub

Private Sub Worksheet_Deactivate()
UserForm1.Hide 'or
'Unload UserForm1
End Sub