Simple function to validate string contents. Compares a given string to a list of illegal values and evaluates whether or not it contains any. Very fast and easy. Can also be used as a string search function with a little modification.
Inputs
strSource - String you are checking
strCompare - String of illegal characters
Assumes
To run:
If Match (strMyFile, "~!@#$%^&*()+`{}[]?><,/") Then
MsgBox "File contains illegal characters!", vbExclaimation
End If
.
Returns
Boolean - True = Source string contains an illegal character.