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 / Mailmerge and Fax / February 2008

Tip: Looking for answers? Try searching our database.

If Statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brenda A. Reid - 28 Feb 2008 18:53 GMT
Word XP

I have a vba userform in a template and one of the questions on the form is
"One
or more classes of shares?"  The choices are one of two optionbuttons One or
More than one.  This is so I can automate the wording in the template to
either singular or plural.

Optionbuttons:
   FrmStage2.sharess
   FrmStage2.sharesp

Document/Template:
   RESOLVED:  that the form of share certificate{if frmState2.sharesp =
True "s"}and
   blank ensorsement thereon, etc.

Logically I would use the above code but of course it doesn't work.  This
should automatically add an s to the word certificate.

Desperate Brenda
Doug Robbins - Word MVP - 28 Feb 2008 19:15 GMT
Where you want either certificate or certificates to appear in the document,
insert a { DOCVARIABLE varcertificate } field and in the userform code, use
the following

With ActiveDocument
   If sharess.value = True then
       .Variables("varcertificate").Value = "certificate"
   Else
       .Variables("varcertificate").Value = "certificates"
   End If
   .Range.Fields.Update
End With

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Word XP
>
[quoted text clipped - 18 lines]
>
> Desperate Brenda
 
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.