View Single Post
 
Old 10-30-2014, 07:24 AM
tejaspareek tejaspareek is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2014
Posts: 13
tejaspareek is on a distinguished road
Default

Thank You Paul,

I have applied the bookmark technique on almost all the dropdowns, its just one dropdown thats bothering me, in this bookmark range, i need to delete table 1 and 3 if criteria 1 matches and delete only table 3 if the other criteria matches. Please help.

Code:
Sub Financial()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
  .Unprotect
  Select Case .FormFields("Financials1").Result
  Case "Not Available"
    With .Bookmarks("Finance1").Range
    For i = 3 To 1 Step -2
        .Tables(i).Delete
     Next
     End With
Case "Limited"
    With .Bookmarks("Finance1").Range
    While .Tables.Count = 3
    .Tables(3).Delete
    Wend
End With
    
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, True
Application.ScreenUpdating = True
End Sub
Reply With Quote