Link to home
Start Free TrialLog in
Avatar of Andrew Crofts
Andrew CroftsFlag for Ukraine

asked on

Something is locked

Word 2007 VBA

mycontentcontrol.Range.ContentControls.Item(12).LockContents = False
        mycontentcontrol.Range.ContentControls.Item(12).Range.Select
        mycontentcontrol.Range.ContentControls.Item(12).Range.Delete
        mycontentcontrol.Range.ContentControls.Item(12).Delete
        Selection.Delete

Open in new window


on this statement I am getting an error

        mycontentcontrol.Range.ContentControls.Item(12).Delete

Open in new window


Run-time error '6188'
This content control is locked and cannot be deleted.

So something somewhere must be locked but what and where?

Any ideas?

TIA
SOLUTION
Avatar of dhsindy
dhsindy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andrew Crofts

ASKER

Found the solution myself

worth a PAQ