0
votes

I am trying to load open vb6 form but it says cannot find project or library and the cursor is pointing to statusbar. This particular line of code:

Private mStatus As StatusBar

I have installed the common controls for vb6 update from Microsoft but it's still not doing the job.

I have also tried this :

not able to open VB project, getting error "C:\windows\system32\mscomctl.ocx" could not be loaded

and

regsvr32 mscomctl.ocx
regsvr32 mscomct2.ocx
regsvr32 comct332.ocx

and closed vb6 down, reopened the project and tried to open the form with the control and it gave me same error message.

The edition is enterprise with sp6 installed.

Any advices to fix the issue will be much appreciated.

Thanks!

1
Have you tried running Visual Basic as Administrator?jac
Hi jac, yes all the time forgot to mention that. :Prlee923
Can you open the .vbp file using notepad and copy/paste the line with mscomctl.ocx on it?George Mastros
Hi G Mastros, I believe you mean the code that uses controls from that ocx? Private mStatus As StatusBarrlee923
sorry I totally misread that . Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCXrlee923

1 Answers

0
votes

I had this problem moving projects from XP 32 bit to Win7 64 bit, and aven after getting VB6 apparently working using the various helpful instructins on this site, every time I tried to load up an existing project it failed on opening the project.

Eventually I fixed it by editing (with Notepad) the reference lines in the .VBP project file, which had C:\WINDOWS\SYSTEM32 hard coded in, to point to C:\Windows\SysWOW64.

Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM32\STDOLE2.TLB#OLE Automation

Change to

Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\STDOLE2.TLB#OLE Automation

Project files now open up and compile fine. But presumably I will have a similar difficulty if I try to open modified projects on a 32 bit system again.