Run time error 424

Closed
toddswint1 Posts 1 Registration date Friday January 31, 2014 Status Member Last seen January 31, 2014 - Jan 31, 2014 at 11:32 PM
 Blocked Profile - Feb 1, 2014 at 11:11 AM
Hello, I'm new to VBA. I've tried everything I can think of to avoid receiving run time error 424 when I try to run the following. Any help is much appreciated.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim woArea As Range
Dim isect As Range
Set woArea = Sheets("Dashboard").Range("F26:F5000")
Set isect = Application.Intersect(Target, woArea)
'
' If no change then nothing happens
'
If Not isect Is Nothing Then
End If
'
' If user selects "edit" then confirm msgbox loads.
' If yes is clicked in msgbox, active row is unlocked for editing.
'
If isect = "edit" Then
Response = MsgBox("Would you like to edit " & isect.Value & "? " & _
"Clicking Yes will highlight editable item values.", vbYesNo + vbQuestion, "Edit Inventory Item")
End If
'
If Response = vbYes Then
Application.Run "Delete_row"
End If
'
' If user selects "delete" then confirm msgbox loads.
' If yes is clicked in msgbox, active row is deleted from list.
'
If isect = "delete" Then
Response = MsgBox("Are you sure you wish to DELETE " & isect.Value & "? " & _
"This action cannot be undone.", vbYesNo + vbExclamation, "DELETE Inventory Item")
End If
'
If Response = vbYes Then
Application.Run "Delete_row"
End If
'
' If user selects "locked" then confirm msgbox loads.
' If yes is clicked in msgbox, active row is locked from editing.
'
If isect = "locked" Then
Response = MsgBox("Would you like to lock " & isect.Value & "? " & _
"Clicking Yes will save and lock editable item values.", vbYesNo + vbQuestion, "Lock Inventory Item")
End If

If Response = vbYes Then
Application.Run "Delete_Row"
End If
'
End Sub
Related:

1 response

Blocked Profile
Feb 1, 2014 at 11:11 AM
Why are you deleting 3 times?

Exit the sub after deleting.

Also, on the application run command line, you may need to specify a complete path if it is not open already.

[An incorrect path as an argument to a host application's File Open command could cause the error.]

//ark
-Moderator/Contributor
0