Anne Troy was telling us:
Anne Troy nous racontait que :
Most people will tell you (I think) that learning VBA is:
--easier done using Excel first, particularly if your user experience
with Excel is about the same as with Word.
Well, the poster wants to learn VBA for Word (See subject line).
The Excel Object library is totally different and the
template/toolbars/events are totally different as well.
I remember when I first started coding some basic Excel VBA, I had to keep
reminding myself to forget about Word VBA and learn from scratch (One basic
difference that took me sometimes to get used to is the Range/Selection
object difference...)
If he is going to learn VBA for Excel, he will not be able to transfer most
of it to Word, except for programming concepts that have nothing to do with
Word or Excel (Such as using variables, loops, error handling, etc..)
So, if the goal is to create code for Words, he should learn VBA through
Word, not Excel.
What could be useful though, is to learn basic VB6 programming, which will
be useful for VBA for Word, Excel, PowerPoint, Outlook, Visio, etc. At
least as long as VBA will be based on VB6!
--easier learned by using the help files and trial and error
--even some of the BEST programmers will record a macro to get an
object name so they can continue working with it
--Try
www.VBAexpress.com and their knowledgebase. It's free.
Also, for a quick start see
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm
Then,
http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm
which must be followed by
http://word.mvps.org/faqs/macrosvba/ModifyRecordedMacro.htm
Finally, check out the Macros/VBA tab at
http://word.mvps.org/FAQs/index.htm
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org