#1
|
|||
|
|||
Help with using VBA to add a row to a table in a protected document
Hi I have a form field document which I need the user to be able to add rows to whilst it is still protected. I have used the VBA code at VBA Code Examples (2) but although it works to add a new row the cursor jumps back to the adress field at the top of the first page instead of to the added row. I have attached the form so you can see what I mean. Can anyone please help as it's driving me demented!! Thanks |
#2
|
||||
|
||||
It is not helped by the use of two tables and a mixture of content controls and form fields. Frankly it would be better if you used form fields throughout - see attached. The code will fire when you click out of the last content control.
Normally I would recommend locking the controls, as some fool will accidentally delete them, so I have only locked the controls in the table. The newly added ones are not locked while testing, but you can easily fix that in the code by releasing the three lines of code that lock them. You may find Insert Content Control Add-In useful.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thank you!!
|
#4
|
||||
|
||||
See also:
Adding a new row to a table in a document with formfields: Macro to add row to table in a Word form Adding a new row to a table in a document with content controls: Code to add new row in table Macro to add row to table in a Word form
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use Macros to add a new row in protected document | cepdance | Word VBA | 6 | 01-04-2017 08:18 AM |
Macro to replace Image, Numbers in Table and in multiple protected word document | balaji | Word VBA | 10 | 03-24-2016 02:11 AM |
Protecting a document; allow sections to be edited - spacing in table cells when protected | dwciardi | Word | 3 | 09-30-2015 01:03 PM |
Autoexpand Table on Protected Sheet | Catalin.B | Excel | 0 | 09-07-2014 07:03 AM |
Using bookmarks in a protected document | Bill Stemp | Word | 0 | 10-16-2010 06:47 AM |