Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Function and Sub Templates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ari - 21 Nov 2005 17:48 GMT
I'm not aware if this is possible but:
when you type in a module
sub thename

vba will complete it by:

sub cmdFinish()

end sub

Is there a way to edit the template it uses for this? I would like it
to create my error handler and add:

cmdFinish_error:
   MsgBox "There was an error, please check the Debug Log"
   Call addMessage("Error in cmdFinish in frmSelectFields_two Err: " &
Err.Number, Err.Description)

so it comes out as

sub cmdFinish()
cmdFinish_error:
   MsgBox "There was an error, please check the Debug Log"
   Call addMessage("Error in cmdFinish in frmSelectFields_two Err: " &
Err.Number, Err.Description)
end sub

when I type sub cmdFinish <enter>
Jay Freedman - 22 Nov 2005 02:31 GMT
Hi Ari,

Templates of this kind are a feature of MZ Tools for VBA, which I
highly recommend for this and dozens of other time-saving features.
Visit www.mztools.com.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>I'm not aware if this is possible but:
>when you type in a module
[quoted text clipped - 24 lines]
>
>when I type sub cmdFinish <enter>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.