borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (.NET compability with old win versions)Next Topic (.Net Etc) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : Create Macro To Build Functions/Subs
Poster Message
dcostelloe
Level: VB Guru

Registered: 11-06-2002
Posts: 74

icon Create Macro To Build Functions/Subs  Archived to Disk

Under Tools Select Macro then Macro Explorer

Right Click Macros (Top) and Select New Macros Project.

Call it what you want for this we will call it sample

Public Module Sample

    Sub AddFunction()
DTE.UndoContext.Open("Add Function")
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "Public Function YourFunction() As Boolean"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "Return True"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
            DTE.ActiveDocument.Selection.NewLine()
            DTE.ActiveDocument.Selection.NewLine()
            DTE.ActiveDocument.Selection.Text = "End Function"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.UndoContext.Close()
End Sub



____________________________
Life is but a merry go round
around and around :-)

Visit us today:
http://www.welford-costelloe.com

05-08-2002 at 11:39 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB.Net : Create Macro To Build Functions/Subs
Previous Topic (.NET compability with old win versions)Next Topic (.Net Etc) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder