opening user form when worksheet activated OR embedding a userform ina worksheet

  • Thread starter Thread starter jason
  • Start date Start date
J

jason

either of these options i am open to.

i do not want the userform to open when the workbook is opened, but
rather i want it opened when the specific worksheet is activated

basically

if worksheets(1).activate then
open UF
end if

this is just the idea.
 
Rightclick on the worksheet tab that should have this behavior.

Select view code.

Paste this into the newly opened code window (usually on the right side).

Option Explicit
Private Sub Worksheet_Activate()
UserForm1.Show
End Sub

(Change the name of the userform.)

Then back to excel. Change to a different sheet, then select your sheet to
test.
 
Back
Top