Here is a simple whois query. It is intended to show how to use the Socket Object.
You can cut and paste the code into VB or VBA.
For more information on the Whois syntax, look at rfc1834.
Download vbs script(zipped).