excel vba - VBA User Defined Type not defined error -


I am trying to write a VBA script to run a SQL selected script and the data is in the named category in Excel Importing ADODB.Connection Dim as rcrds as ADODB.Recordset Public Sub Update_Scorecard_2 () Dim as ssql as the Range app as the string Dim myrange option. Screen Renewal = False Set cnt = New ADODB.Connection cnt.Open "Provider = MSDAORA; Data Source = ODSPRD01; User ID = DWH_ADH; Password = mypassword;" Call runQuery (range ("DATA_DUMP_SQL"). Value, range ("DATA_DUMP") cnt.Close End Sub

I'm getting the error "User defined type not defined" on the line

  Dim CNT as ADODB.Connection   

/ P>

What am I doing wrong?

Be sure that you have "Microsoft ActiveX Data object library "(in Set in:)

If you do not have this set, the runtime environment is not known about the ADODB library, so it is not a defined error. / P>


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -