###Excel VBA, 209 bytes
Excel VBA, 209 bytes
For i = 1 To 15
x = x + Chr(Int(90 * Rnd + 33))
Next
p = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$"
With New RegExp
.Pattern = p
Set m = .Execute(x)
If m.Count = 0 Then
MsgBox "redo"
Else
MsgBox x
End If
End With
Randomly generates 15 ASCII characters so all possible combinations are possible. Then uses a regular expression pattern to check if it contains at least one of each criteria.
If it does then the password is displayed, if not "redo" is displayed.
Credit to Bart Kiers for the Regular Expression pattern: https://stackoverflow.com/questions/1559751/regex-to-make-sure-that-the-string-contains-at-least-one-lower-case-char-upper