Thread: [Solved] Check box values to text
View Single Post
 
Old 10-14-2013, 10:04 AM
wpryan wpryan is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2013
Location: Orlando, FL USA
Posts: 26
wpryan is on a distinguished road
Default

Thanks for the response, but I guess I'm not getting it. I copied and pasted into the Click command, and changed some of the terminology to match what's in my document. Not working. Here's what I changed (in red):
Code:
Dim oCtr As Control
Dim oRng As Word.Range
  For Each oCtr In Me.Controls
    Select Case TypeName(oCtr)
      Case "Checkbox"
        Select Case oCtr.Name
          Case "ckLasik"
            If Controls(oCtr.Name).Value = True Then
              Set oRng = ActiveDocument.Bookmarks("bmCourse").Range
              oRng.Text = "CheckBox1 is Checked"
              ActiveDocument.Bookmarks.Add "bmCourse", oRng
            End If
        End Select
        
    End Select
  Next oCtr
Of course I have 8 other "cases", for which I should repeat the code, right?:
Code:
Case "Checkbox"
        Select Case oCtr.Name
          Case "ckLasik"
            If Controls(oCtr.Name).Value = True Then
              Set oRng = ActiveDocument.Bookmarks("bmCourse").Range
              oRng.Text = "CheckBox1 is Checked"
              ActiveDocument.Bookmarks.Add "bmCourse", oRng
            End If
Reply With Quote