You should check declarations. This API is not exported by user32.dll.
Reference said library is wer.dll.
And this function needs Unicode string. So, you have to pass it. Like below
s = "myapp.exe"
s = StrConv(s, vbUnicode)
WerAddExcludedApplication(s, 1)