'New' cannot be used on an interface

A Dim Statement (Visual Basic) uses a New (Visual Basic) clause when declaring a variable to be of an interface type.

Although an interface is a reference type, you cannot create an instance of it. You can use New only to create an instance of a class or a structure.

Error ID: BC30375

To correct this error

  1. If the variable is to be of an interface type, remove the New keyword.

  2. If the variable is to refer to an instance, declare it to be of a class or structure type. Retain the New keyword to create an instance.

See Also

Reference

Interface Statement (Visual Basic)

Class Statement (Visual Basic)

Structure Statement