The CreateObject method of an object of ClassType clsServer creates an object.
objServer.CreateObject(ClassType, [SubClassType])
When you are using DSO to construct major objects such as cubes, partitions, dimensions, and so forth, it is more convenient to use the AddNew method instead. The AddNew method creates an object of the appropriate ClassType in a collection and initializes its Name and Parent properties.
You can use the “LocalHost” to specify the OLAP server running on the same computer as your DSO application.
' Assume objServer is a server object and objDB is a database object
Dim objCube as New DSO.MDStore
Set objCube = objServer.CreateObject("clsCube")
objCube.Name = "NewCube"
objDB.MDStores.Add objCube