Here is the code I wrote and the auto run is not working. Any suggestions on what I'm over looking.
Sub Macro12()
'
' Macro12 Macro
' Macro recorded 4/25/2006 by Wendy Smith
'run the macro did cells change any time a entry is made in a cell in 1244 HT-DOC 12
ThisWorkbook.Worksheets("1244 HT-DOC 12").OnEntry = "DidCellsChange"
End Sub
Sub keycells()
Dim keycells As String
'define which cells should trigger the macro
keycells = "L9:M42"
End Sub
Sub keycellschange()
Dim cell As Object
Dim reportlocation As String
Dim sh As String
Dim strvar As String
Dim p As Integer
Dim m As String
strvar = "N/A"
sh = "1244 HT-DOC 12"
testrange = keycells
p = 7
'if the values in L9:M42 are equal to 0
For Each cell In Range("L9:M42")
p = p + 1
m = p + 1
If cell = 0 Then
reportlocation = "R" + m
Sheets(sh).Range(reportlocation) = strvar
Else
cell = xlNone
End If
Next cell
End Sub
Sub Macro12()
'
' Macro12 Macro
' Macro recorded 4/25/2006 by Wendy Smith
'run the macro did cells change any time a entry is made in a cell in 1244 HT-DOC 12
ThisWorkbook.Worksheets("1244 HT-DOC 12").OnEntry = "DidCellsChange"
End Sub
Sub keycells()
Dim keycells As String
'define which cells should trigger the macro
keycells = "L9:M42"
End Sub
Sub keycellschange()
Dim cell As Object
Dim reportlocation As String
Dim sh As String
Dim strvar As String
Dim p As Integer
Dim m As String
strvar = "N/A"
sh = "1244 HT-DOC 12"
testrange = keycells
p = 7
'if the values in L9:M42 are equal to 0
For Each cell In Range("L9:M42")
p = p + 1
m = p + 1
If cell = 0 Then
reportlocation = "R" + m
Sheets(sh).Range(reportlocation) = strvar
Else
cell = xlNone
End If
Next cell
End Sub