login about faq

I am testing your toolkit. I got an error when I declared an object of IMAP in Visual Basic 6. Do you know how to overcome this error?

dim imap as new ChilkatImap

Compile error
Invalid use of New keyword

asked Sep 05 '12 at 10:47

chilkat's gravatar image

chilkat ♦♦

This error occurs if you incorrectly add the ActiveX component to your VB6 project. Follow these rules:

1) If the ActiveX objects are dynamically created (they are not dragged and dropped onto a form from the palette), then add a Reference to the ActiveX. You should NOT see the icons for the ActiveX in the palette. Instances of the ActiveX objects are created by New statements in your code.

2) If the Chilkat ActiveX objects are dragged and dropped onto your form, then add the component via the “Project–>Components” menu, NOT the “Project–>References” menu. In my opinion, it is always better to create instances of the objects dynamically because the Chilkat objects are not visual controls and won’t be visible on your form anyway at runtime.

3) Never do both — you should either add a Reference (Project–>References) or add the component to the palette (Project–>Components) but NEVER BOTH.


answered Sep 05 '12 at 10:47

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 05 '12 at 10:47

Seen: 2,031 times

Last updated: Sep 05 '12 at 10:47

powered by OSQA