I tried to create a local cube (.cub) from SQL 2000 database like following, i alway got an error message " Error# 3001 was generated by ADODB.Connection, Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.".
Need help badly about this, i struggled ith it for the whole morning.

Dim g_sCnn as String
Dim cnCube As New ADODB.Connection
Dim strConnection As String

Dim strProvider As String
Dim strDataSource As String
Dim strSourceDSN As String
Dim strCreateCube As String

g_sCnn = "Provider=SQLOLEDB; Data Source=SVR1; Initial Catalog=DB1; UserId=sa; Password="

strProvider = "PROVIDER=MSOLAP"
strDataSource = "DATA SOURCE=" & App.Path & "\LocalCube2.cub"
strSourceDSN = "SOURCE_DSN = """ & g_sCnn & """"

strCreateCube = "CREATECUBE = CREATE CUBE MyCube (" & _
"DIMENSION [Employee]," & _
"LEVEL [Employee]," & _
"MEASURE [Hours] " & _
"FUNCTION SUM " & _
"TYPE DBTYPE_R8" & _
"); " & _
"INSERTINTO = INSERT INTO MyCube ([Employee].NAME,[Employee].KEY, [Measures].[Hours]) " & _
"SELECT Person.Name, Person.PersonId, Time.TotalHours " & _
"From Person, Time " & _
"Where Person.PersonId = Time.PersonId"

strConnection = strProvider & ";" & strDataSource & ";" & strSourceDSN & ";" & strCreateCube & ";"

Set cnCube = New ADODB.Connection
cnCube.Open strConnection