Hello cporter5,

It appears you defined a Worksheet event inside a standard VBA module...
Public Sub Worksheet_Activate()
  N = 1
End Sub

N will remain zero because this code will never be run. Cut this code from the module and following the directions below.

How to Save a Worksheet Event Macro
  1. Copy the macro using CTRL+C keys.
  2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
  3. Left Click on View Code in the pop up menu.
  4. Paste the macro code using CTRL+V
  5. Make any custom changes to the macro if needed at this time.
  6. Save the macro in your Workbook using CTRL+S