Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-21-2014, 06:03 AM
macropod's Avatar
macropod macropod is offline Delete rows using checkbox in word Windows 7 32bit Delete rows using checkbox in word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

before you go down that path, see: http://office.microsoft.com/en-us/wo...010031067.aspx
Quote:
it would be more useful for me in terms of usability and creation of selection dependencies
How are they better for either of those? The deletion code is also more complex than for use with content controls:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, Pwd As String, pState As Variant
With ActiveDocument
  If .ProtectionType <> wdNoProtection Then
    Pwd = InputBox("Please enter the Password", "Password")
    pState = .ProtectionType
    .Unprotect Pwd
  End If
  With .Tables(1).Range
    For i = .Rows.Count To 1 Step -1
      With .Rows(i)
        If .Range.InlineShapes.Count = 1 Then
          If .Range.InlineShapes(1).Type = wdInlineShapeOLEControlObject Then
            If InStr(.Range.InlineShapes(1).OLEFormat.ClassType, "CheckBox") > 0 Then
              If .Range.InlineShapes(1).OLEFormat.Object = False Then
                .Delete
              End If
            End If
          End If
        End If
      End With
    Next
  End With
  If pState <> wdNoProtection Then .Protect Type:=pState, NoReset:=True, Password:=Pwd
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete rows using checkbox in word Macro to delete all empty rows from all tables braddgood Word VBA 15 10-02-2015 01:54 PM
Find and Delete Rows damaniam Word VBA 1 03-11-2014 06:54 AM
Delete rows using checkbox in word Word Macro to find and delete rows that contain adjacent cells containing "." AlexanderJohnWilley Word VBA 7 11-08-2012 10:15 AM
Delete rows using checkbox in word Delete all rows but the last. elky1967 Word VBA 14 09-21-2012 05:27 AM
Delete rows using checkbox in word Macro to conditionally delete rows Steve_D Excel 2 08-24-2012 09:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft