Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2014, 11:11 AM
deboer deboer is offline Delete rows using checkbox in word Windows XP Delete rows using checkbox in word Office 2010 64bit
Novice
Delete rows using checkbox in word
 
Join Date: May 2014
Posts: 14
deboer is on a distinguished road
Default Delete rows using checkbox in word

In 05-04-2014 I've posted a New Thread to help me create a macro to Delete the rows of the unchecked checkboxs.



The post is: https://www.msofficeforums.com/word-...e-answers.html

However instead of using checkbox Content Control is it possible to do the same thing with the Check Box ActiveX Control?

I attach a sample document for analysis.

Anyone can help me on this?

Thanks
Jorge Vieira
Attached Files
File Type: docx Sample.docx (20.5 KB, 21 views)
Reply With Quote
  #2  
Old 06-20-2014, 09:36 PM
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: 21,962
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

Yes, it's possible, but your ActiveX checkboxes aren't in a table anyway, so it's not clear what you're trying to achieve, aside from perhaps deleting them. If they're for use in a table, I also don't see that you'll have gained anything by changing to ActiveX checkboxes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-21-2014, 05:00 AM
deboer deboer is offline Delete rows using checkbox in word Windows XP Delete rows using checkbox in word Office 2010 64bit
Novice
Delete rows using checkbox in word
 
Join Date: May 2014
Posts: 14
deboer is on a distinguished road
Default

Your right. I forgot to put the ActiveX checkboxes in a table. I attach a new sample document.
Changing to ActiveX checkboxes, I noticed later that it would be more useful for me in terms of usability and creation of selection dependencies.
I apreciate your help if you could do something about it, Paul.

Thks
Attached Files
File Type: docx Sample.docx (19.6 KB, 38 views)
Reply With Quote
  #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: 21,962
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
  #5  
Old 06-22-2014, 04:16 AM
deboer deboer is offline Delete rows using checkbox in word Windows XP Delete rows using checkbox in word Office 2010 64bit
Novice
Delete rows using checkbox in word
 
Join Date: May 2014
Posts: 14
deboer is on a distinguished road
Default

So you think is more easy using content controls? Ok I follow your advice because i'me not very confortable on this matter.
But in that case can you hep me in another think please:
How can I create dependency selection using content controls? For example,in the sample document attached, i want:
- if option 1 is selected automatically option 2 is also selected
- if option 1 is unselected automatically option 2 will be also unselecteded
- if option 3 is selected than option 4 cannot be selected

Thks
Attached Files
File Type: docx Sample.docx (13.6 KB, 14 views)
Reply With Quote
  #6  
Old 06-22-2014, 05:21 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: 21,962
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

If Option 2 is tied to option 1, why do you have option 2? It seems rather pointless making it a separate option if it can't be chosen in its own right. As for having exclusive options, see, for example: https://www.msofficeforums.com/word-...html#post33489
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



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 05:10 AM.


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