Mogli
Mogli

Reputation: 2012

Conversion of VB6 project to .net- references error?

I have a VB6 project when i try to tun this it throws some errors like

The referenced component 'AxMSCommLib' could not be found.  
The referenced component 'AxOWC' could not be found.    
The referenced component 'ComctlLib' could not be found.    
The referenced component 'Microsoft.Office.Interop.Excel' could not be found.   

and when i remove these references it shows the error where these references are used further like in this line

Public WithEvents ProgressBar2 As AxComctlLib.AxProgressBar

it says

Type 'AxComctlLib.AxProgressBar' is not defined.    

Facing this situation first time, how to solve this, how to add these references in project or is there any other solution ?

Upvotes: 3

Views: 1678

Answers (1)

MarkJ
MarkJ

Reputation: 30398

As Patrik says in a comment, these are all COM object that needs to be registered before they can be used by a development environment (both VB6 and .Net). The error message you get indicates that these files are not registered on your computer.

You need to install the COM object dependencies. Find the original installation package for each dependency and run it. Hint - one of them is Excel. Another one might be the Microsoft Comm control (I forget the exact name).

Some people may advise you to try and register OCXs & DLLs manually, but it's faster to run the install packages, as the OCXs/DLLs may require other things in order to actually work.

Upvotes: 2

Related Questions