Running a Test upgrade from GP10 to GP2010, add a window to vba and used the connection string:
Getting the error when trying to set the connection at: Set cn = UserInfoGet.CreateADOConnection
Run-time error '429'
ActiveX component can't create the object.
object variable or with block variable not set
Code:
Dim userinfoObj As UserInfo
Dim CompanyName As String
Dim cn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim cmd As New ADODB.Command
Private Sub Window_BeforeOpen(OpenVisible As Boolean)
CallConnection
End Sub
Public Function CallConnection()
Set cn = UserInfoGet.CreateADOConnection
cn.DefaultDatabase = UserInfoGet.IntercompanyID
cmd.ActiveConnection = cn
cmd.CommandType = adCmdText
End Function
*This post is locked for comments