Doesn't really crash the computer - it appears to be stuck in an infinite loop. Unless you have a Break key on computer, just terminate Access with the X close or Windows Task Manager.
Did you run Debug Compile? Missing an End If line or combine the Else and the following If into an ElseIf, however, your code still bombs. Consider:
Code:
Sub KillFile()
Dim fs, fl, f, X
Set fs = CreateObject("Scripting.FileSystemobject")
Set fl = fs.GetFolder("C:\Users\Desktop\Data\5 min\us\nyse\1")
Set f = fl.Files
For Each X In f
If InStr(1, X, "_", vbTextCompare) > 0 Or InStr(1, X, "-", vbTextCompare) > 0 Then
If Dir(X) <> "" Then Kill (X)
End If
Next
Also review http://www.allenbrowne.com/ser-59.html