Sorry, but VBA doesn't support working with regular expressions. However, has a module RegExpr for VB you can buy for $99 (single developer license). If you don't like that, code a checkIP-function in VB yourself.

And sorry again, usually we don't provide code here. You'll find it very instructive to do this yourself or find it somewhere on the net.