C
charlie6067
I've designed a user form that's a mixture of checkboxes and one set
of radio buttons. When the OK button is clicked, each checkbox runs a
macro that inserts a stored autotext entry at a bookmark - that works
great. I want the same action for a group of radio buttons (tbut the
coding method must be different as I'm having problems. Here's the
code for the OK button. Please show me the coding errors. Thanks,
Charlie charlie6067
On of the checkboxes is named optTX.
Autotext entry = TXAdd
Private Sub optTX_Click()
End Sub
Private Sub cmdOK_Click()
' OK Button
If optTX.Value = True Then
' Call TXAdd autotext address for TX
PasswordOff
Application.DisplayAutoCompleteTips = False
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
End With
Selection.GoTo What:=wdGoToBookmark, Name:="bmkALTAddress"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("TXAdd"). _
Insert Selection.Range, RichText:=True
PasswordOn
End If
End Sub
of radio buttons. When the OK button is clicked, each checkbox runs a
macro that inserts a stored autotext entry at a bookmark - that works
great. I want the same action for a group of radio buttons (tbut the
coding method must be different as I'm having problems. Here's the
code for the OK button. Please show me the coding errors. Thanks,
Charlie charlie6067
On of the checkboxes is named optTX.
Autotext entry = TXAdd
Private Sub optTX_Click()
End Sub
Private Sub cmdOK_Click()
' OK Button
If optTX.Value = True Then
' Call TXAdd autotext address for TX
PasswordOff
Application.DisplayAutoCompleteTips = False
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = True
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
End With
Selection.GoTo What:=wdGoToBookmark, Name:="bmkALTAddress"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = True
End With
ActiveDocument.AttachedTemplate.AutoTextEntries("TXAdd"). _
Insert Selection.Range, RichText:=True
PasswordOn
End If
End Sub