Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-20-2014, 05:12 AM
macropod's Avatar
macropod macropod is offline Delete Tables using conditions from Drop Down Field Windows 7 64bit Delete Tables using conditions from Drop Down Field Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

Try:
Code:
Sub Parent()
Application.ScreenUpdating = False
Dim i As Long
ActiveDocument.Unprotect
Select Case ActiveDocument.FormFields("Parent1").Result
Case "No"
  For i = 14 To 10 Step -1
    ActiveDocument.Tables(i).Delete
  Next
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, True
Application.ScreenUpdating = True
End Sub
PS: When posting code, please use the code tags (added via the # symbol on the posting menu).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Tables using conditions from Drop Down Field Macro to delete all empty rows from all tables braddgood Word VBA 15 10-02-2015 01:54 PM
Excel to Word and delete certain tables jon12355 Word VBA 10 10-15-2014 03:01 PM
Delete Tables using conditions from Drop Down Field IF field + Drop-Down list nightkn8 Word 2 07-02-2014 02:42 AM
Delete Tables using conditions from Drop Down Field Form Field Drop Down List James Ayers Word 3 07-14-2013 07:53 PM
Delete Tables using conditions from Drop Down Field using checkboxes to delete tables atfresh Word Tables 1 06-19-2011 09:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:11 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