Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=myserver"
cn.Execute "create database test"
Set cn = Nothing
You can get more fancy with this. If you will use this more than once I would recommend creating a stored procedure that you would execute. This can also be used if you need to pass parameters like database name, location, size ...
If you are using vb.net take a look at the following ms article: