vbe6ext.olb file (extensibility) for VB6 & VB2010

ajetrumpet

Banned for being rude
Joined
Apr 12, 2008
Messages
569
Office Version
  1. 365
  2. 2016
  3. 2007
Platform
  1. Windows
ALL,

I'm working on a VB6 project right now that has about 400K lines of code in it, so I'm trying to see if there's a way I can manipulate the IDE. e.g. - be able to write a small sub that runs through each module in the project and read the lines for CALL statements.

I already have something similar written in vba with excel, but obviously this project is NOT in vba. is there something similar to the extensiion library for vba, in vb6 or vb2010?? I have already found a package that does it in vb6 here: http://www.vbforums.com/showthread.php?t=448824

However, I'd like to download an OLB or DLL for vb6 if there is one. All I want is access to the extensibility object structure for this VB6 project like what VBA does. all vba requires is a reference to the ext. DLL.

is it that simple in vb projects too??

thanks for any help guys!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
The VB6 extensibility (VB6EXT.OLB) should be installed by default with a standard intallation of VB6.

Look under Project>References. Ir should be n the list of references.
 
Upvote 0
thanks.

actually Here's what I have for VBA, which is something I wrote long ago:

Code:
Function CountVbaLines()

On Error GoTo ErrorHandler

Dim TotalLines As Double
Dim vbEditor As VBIDE.VBE
Dim VBProj As VBIDE.VBProject
Dim VBobj As VBIDE.VBComponent

Set vbEditor = Application.VBE
Set VBProj = vbEditor.ActiveVBProject

   For Each VBobj In VBProj.VBComponents

      TotalLines = TotalLines + VBobj.CodeModule.CountOfLines
   
   Next VBobj
   
      CountVbaLines = TotalLines

ErrorHandler:
   Set vbEditor = Nothing
   Set VBProj = Nothing

End Function

I want to write the equivalent in VB6, but I have that at work and I'm testing this junk on VB2010 express at home because I can't find VB6 anymore to download.

Do you possibly know, off hand, what has changed in vb2010 in terms of the above referenced code? What I'm finding is that there is no CodeModule for the VBComponent in 2010. That seems to be the only thing I'm missing here.

Thanks again.
 
Upvote 0
thanks.

actually Here's what I have for VBA, which is something I wrote long ago:

Code:
Function CountVbaLines()

On Error GoTo ErrorHandler

Dim TotalLines As Double
Dim vbEditor As VBIDE.VBE
Dim VBProj As VBIDE.VBProject
Dim VBobj As VBIDE.VBComponent

Set vbEditor = Application.VBE
Set VBProj = vbEditor.ActiveVBProject

   For Each VBobj In VBProj.VBComponents

      TotalLines = TotalLines + VBobj.CodeModule.CountOfLines
   
   Next VBobj
   
      CountVbaLines = TotalLines

ErrorHandler:
   Set vbEditor = Nothing
   Set VBProj = Nothing

End Function
I want to write the equivalent in VB6, but I have that at work and I'm testing this junk on VB2010 express at home because I can't find VB6 anymore to download.

Do you possibly know, off hand, what has changed in vb2010 in terms of the above referenced code? What I'm finding is that there is no CodeModule for the VBComponent in 2010. That seems to be the only thing I'm missing here.

Thanks again.

I am afraid I don't know VB2010 which is different from Classic VB.
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top