Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

October 26, 2005

Invalid use of New keyword


I get the error message "Invalid use of New Keyword" in my Visual Basic 6.0 program in the Dim statement: Dim object as New ChilkatCrypt2. Why is that?


In Visual Basic 6.0, you can either "Add a Reference" to a component, or "Add the Component" to your palette. You should never do both, because if you do, nothing will work. If you are creating the component dynamically via the use of the New keyword, you should Add a Reference (in the VB6 IDE, this is the "Project/References…" menu item). If you intend to drag-and-drop the component onto your VB6 form, then Add the Component (via the "Project/Components…" menu item).

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.