Anda di halaman 1dari 1

Private Sub Worksheet_Change(ByVal Target As Range)

'Do nothing if more than one cell is changed or content is deleted'


If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub

'Determine if change was made to cell P32 of sheet 19.Feu'


If Target.Address = "P32" Then

'Ensure target is a number'


If IsNumeric(Target) Then

'Stop any possible runtime errors and halting code'


On Error Resume Next

'Turn off ALL events so the code is not put into a loop'
Application.EnableEvents = False

'Call GoalSeek2'

'Turn events back on'


Application.EnableEvents = True

'Allow run time errors again'


On Error GoTo 0

End If

End If

End Sub

Anda mungkin juga menyukai