sub and function templates

  • Thread starter Thread starter Kooshesh
  • Start date Start date
K

Kooshesh

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>
 
Not in a manner that is native to Access, but google MZ-Tools. You'll
find it most useful and I believe that it does support templates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Subform Validation Code 1
problems with slow dao.querydefs 1
Outlook events stop work randomly 0
ADODB Question 1
Error Not resetting 1
proper code placement 4
check box error 1
error handling 1

Back
Top