Option Button Question

J

JeanneJo

I have a fax cover sheet which says the original will/will not follow after
the fax. I have set up option buttons for the Will and for the Will Not, as
well as bookmarks to insert an X depending on the option the user selects.

How do I code the buttons to insert an X into the bookmark from the option
button they select?

And thanks very much for your help, as always.
 
D

Doug Robbins - Word MVP

Where are the option buttons?

--
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, originally posted via msnews.microsoft.com
 
J

JeanneJo

Oops - I didn't provide enough information, did I? The option buttons are in
a UserForm - this is my code thus far:

Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("From").Range.InsertBefore txtFrom
.Bookmarks("To").Range.InsertBefore txtTo
.Bookmarks("FaxNumber").Range.InsertBefore txtFax
.Bookmarks("NumberOfPages").Range.InsertBefore TextBox5
.Bookmarks("Subject").Range.InsertBefore txtSubject
.Bookmarks("FileNumber").Range.InsertBefore txtFileNo
.Bookmarks("Message").Range.InsertBefore txtMessage
End With

Me.Hide
End Sub
Private Sub obWill_Click()
If obWill.Value - True Then
???
ElseIf obWillNot.Value = True Then
???

End If
End Sub

Obviously still trying to learn to write code - it's a slow process.
Apologize for not including more information initially.

JeanneJo.
 
D

Doug Robbins - Word MVP

Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("From").Range.InsertBefore txtFrom
.Bookmarks("To").Range.InsertBefore txtTo
.Bookmarks("FaxNumber").Range.InsertBefore txtFax
.Bookmarks("NumberOfPages").Range.InsertBefore TextBox5
.Bookmarks("Subject").Range.InsertBefore txtSubject
.Bookmarks("FileNumber").Range.InsertBefore txtFileNo
.Bookmarks("Message").Range.InsertBefore txtMessage
If obWill.Value = True then
.Bookmarks("WillSendOriginal").Range.InsertBefore "X"
End If
End With

Me.Hide
End Sub



--
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, originally posted via msnews.microsoft.com
 
J

JeanneJo

Thank you, Doug. It works flawlessly! I think maybe I make this stuff way
harder than it ought to be.

Appreciate your help very much.

JeanneJo.
 

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