View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ciccia ciccia is offline
external usenet poster
 
Posts: 2
Default Why I get #Name? When I use a sub

From the Excel, I tried to use Visual Basic Edit to create some sub/functions.

Private Sub Worksheet_Calculate()
Worksheets("Sheet1").Activate
ActiveSheet.Cells(2, 1).Formula = "=Sum(A1:A5)"
End Sub

From the Sheet1, I enter "Worksheet_Calculate()" in a cell.
#Name? displays in the cell where I entered the sub name.
Why?