Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid use of NEW keyword.

Status
Not open for further replies.

HighlandJinx

Programmer
May 20, 2002
34
GB
Hi folks, I have the following code that keeps throwing the "Invalid Use of NEW keyowrd" error, any ideas. I tried the search function but it seems to be down today.

*Error Here* Set matSpecArray = New XArrayDB
arrayRecordCount = PipAdodc2.Recordset.RecordCount
matSpecArray.ReDim 0, arrayRecordCount, 0, 0
If PipAdodc2.Recordset.RecordCount <> 0 Then
PipAdodc2.Recordset.MoveFirst
End If
taa for the help.
:)
 
I exactly don't know what you are trying to do here. What is XArrayDB??
New keyword is normally used for instantiating objects, of a class, custom or inbuilt vb classes. If you are trying to declare an array using a New keyword that's going to give you an error. Also if XArrayDB is indeed a class, created by you, or a dll created by you, make sure you have given a proper reference to it i.e. if it is a dll then add it in your References, by going to Project--> Reference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top