VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked

by Ahmed Hassan (2 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 6th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked this tip somewhere on the Internet I tested

Rate Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked



I picked this tip somewhere on the Internet I tested it and it works.
It was written by Francesco Balena.
It is wirtten in an easy to follow steps and this might become your first Active X DLL or your first Active x EXE
Ahmed Hassan

[email protected]

If you need help making this add-in feel free to email.


'ADD REMARKS TO YOUR PROCEDURES

'You can make your code more readable by always adding a remark on top of all your procedures. Create an add-in that makes it fast and easy. First, run New Project under the File menu and select Addin from the project gallery that appears. In the Project Properties dialog, change the project name to RemBuilder. In the AddToIni procedure (contained in the AddIn.bas module), change the MyAddin.Connect string to RemBuilder.Connect.
'    Press F2 to show the Object Browser, select the RemBuilder project in the upper combo box, then right-click on the Connect class in the left-most pane and select the Properties menu command. In the dialog that appears, change the description into Automatic Remark Builder (or whatever you want).
'    In the IDTExtensibility_OnConnection procedure (in the Connect.cls module), search for the My Addin string and modify it to &Remark Builder. This is the caption of the menu item that will appear in the Add-Ins menu. In the Immediate window, type AddToIni and press Enter to register the add-in in the VBADDIN.ini file. In the MenuHandler_Click procedure in  Connect.cls, delete the only executable line (Me.Show) and insert this code instead:
'
'SendKeys "'" & String$(60, "-") & vbCrLf _
'    & "' Name:" & vbCrLf _
'    & "' Purpose:" & vbCrLf _
'    & "' Parameters:" & vbCrLf _
'    & "' Date: " & Format$(Now, "mmmm,dd yy") _
'    & "' Time: " & Format$(Now, "hh:mm") & vbCrLf _
'    & "'" & String$(60, "-") & vbCrLf
'
'    Compile this program into an EXE or a DLL ActiveX component, then install the add-in as usual from the Add-In Manager. Before you create a procedure, select the Remark Builder menu item from the Add-Ins menu to insert a remark template in your code window, and you'll never again have to struggle against an under-documented program listing.
'-Francesco Balena, Bari, Italy


Download this snippet    Add to My Saved Code

Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked Comments

No comments have been posted about Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked . Why not be the first to post a comment about Learn to Build a small Add-In that adds comments to your procedures with one mouse click. I picked .

Post your comment

Subject:
Message:
0/1000 characters