User-freindly Spreadsheet/Database to store code

lionelnz

Well-known Member
Joined
Apr 6, 2006
Messages
571
Hi. I am looking for a simple way to record my code that I develop so as I do not have to re-invent the wheel or spend hours looking for an answer.

I have developed a simple spreadsheet with the headings
[TABLE="width: 430"]
<TBODY>[TR]
[TD="width: 79, bgcolor: transparent"]Type
[/TD]
[TD="width: 114, bgcolor: transparent"]Name
[/TD]
[TD="width: 114, bgcolor: transparent"]Workbook
[/TD]
[TD="width: 101, bgcolor: transparent"]Date
[/TD]
[TD="width: 164, bgcolor: transparent"]Function
[/TD]
[/TR]
</TBODY>[/TABLE]


Maybe someone has a better way.

Is there a way to hyperlink the name of the procedure to the codein the VB editor?


[TABLE="width: 430"]
<TBODY>[TR]
[TD="width: 79, bgcolor: transparent"][/TD]
[TD="width: 114, bgcolor: transparent"][/TD]
[TD="width: 114, bgcolor: transparent"][/TD]
[TD="width: 101, bgcolor: transparent"][/TD]
[TD="width: 164, bgcolor: transparent"][/TD]
[/TR]
</TBODY>[/TABLE]
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
As far as I know there is no way to automatically create that chart. You have to push a button.

Something like this perhaps

Code:
Sub test()
    Dim SomeWorkbook As Workbook
    Dim oneComponent As VBComponent
    Dim LineNumber As Integer
    
    Set SomeWorkbook = ThisWorkbook
    For Each oneComponent In SomeWorkbook.VBProject.VBComponents
        With oneComponent.CodeModule
            For LineNumber = .CountOfDeclarationLines + 1 To .CountOfLines
                If .ProcStartLine(.ProcOfLine(LineNumber, vbext_pk_Proc), vbext_pk_Proc) = LineNumber Then
                    Range("A65536").End(xlUp).Offset(1, 0) = ThisWorkbook.Name
                    Range("A65536").End(xlUp).Offset(0, 1) = .Parent.Name
                    Range("A65536").End(xlUp).Offset(0, 2) = .ProcOfLine(LineNumber, vbext_pk_Proc)
                End If
            Next LineNumber
        End With
    Next oneComponent
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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