Run macro if user goes to a specific worksheet

  • Thread starter Thread starter Danielle
  • Start date Start date
D

Danielle

I have a workbook with several worksheets. There is on worksheet that I want
to run a macro on if the user of the worksheet goes to it.

Any ideas?
 
Place the below as the first line of the macro.

If Environ("Username") <> "username" Then Exit Sub

If this post helps click Yes
 
Oops....Use the Worksheet_Activate event...Right click sheet tab>View code and

Private Sub Worksheet_Activate()

End Sub

If this post helps click Yes
 
Back
Top