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 / August 2005

Tip: Looking for answers? Try searching our database.

Rename a Module

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pleasesendspamtothisadress@gmx.net - 28 Aug 2005 21:29 GMT
Hi all together,

Have I to worry about two (or more) modules that are called the same?
Because I always have to use the given names like "Module1", "Module2",
etc. and therefore it could happens that two (or more) documents are
opend where both includes a "Module1"-Module.

Or is there (2nd) a possibility renaming a module?

Regards,
Nachtigall
Jay Freedman - 29 Aug 2005 01:39 GMT
>Hi all together,
>
[quoted text clipped - 7 lines]
>Regards,
>Nachtigall

Select the module in the Project pane of the VBA editor. Display the
Properties pane (keyboard shortcut is F4). You can change the module's
name there. It's a good idea to rename every module to something
descriptive.

OTOH, it's a Really Bad Idea (tm) to have modules in documents unless
it can't be avoided. Put the modules in templates, either global
templates or ones used to base new documents (see
http://www.word.mvps.org/FAQs/Customization/WhatTemplatesStore.htm).

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
pleasesendspamtothisadress@gmx.net - 29 Aug 2005 06:15 GMT
Can there occur an error because of two Modules called the same?

Nachtigall
Jonathan West - 29 Aug 2005 15:10 GMT
> Can there occur an error because of two Modules called the same?

Yes. Within a single document or template, all the modules must have unique
names.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

 
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.