• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 124
  • Last Modified:

runtime error

How to solve "Cannot create ActiveX object!!" error in run time. Why cannot use "Createobject" in the statment? It will occur run time error.
1 Solution
Many possible reasons

1 Check your spelling. Maybe a typing mistake in the class name?
2 Check whether your ActiveX component was registered correctly. If not, use Regsvr32.exe to register it.
3 Perhaps the class is not creatable - you'd get the same error if you try to use CreateObject to create a VB command button or a ListView's ListItem for example. In that case, usually there is a main class for the component, and it usually has a "Create..." method for creating the object.
galvaniAuthor Commented:
The error occur when I use createobject to open/create a text file.  How to solve it?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now