Count the number of times a worksheet is viewed

  • Thread starter Thread starter MichaelRLanier
  • Start date Start date
M

MichaelRLanier

Is there a simple macro that will show how many times a worksheet (not
workbook) has been viewed? Thanks.

Michael
 
Right click the worksheet tab, select 'View Code', copy and paste this into
the empty window,

Private Sub Worksheet_Activate()
Range("A1") = Range("A1") + 1
End Sub

Change the cell to one that suits you, close the VB window and save the
file,
Regards,
Alan.
 
Back
Top