on click code repeating

R

Ray Docks

Hi, I have a user form with 8 check boxes. Each relates to
a module of text from another file to be inserted in a
user guide. The user checks the modules required then hits
OK to insert.

Problem is, if the user deselects a module it inserts it
again, then if they reselect it also inserts again. How do
I get this to read the check boxes only when the user hits
close so that the correct modules are inserted on exit.

This is the code used, repeated 8 times for different
modules.

Private Sub module1_Click()
If catalogue.Value = True Then
Selection.EndKey Unit:=wdStory
Selection.InsertFile
FileName:="c:path\filename.doc", Range:="bookmark", _
ConfirmConversions:=False, Link:=False,
Attachment:=False

End If
End Sub

Thanks in advance,
Ray.
 

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

Top