I have a Word document (a table) that I’ve protected (read-only). A custom menu is available for the user to add a row to the table. This menu selection opens a form where the user types in the values to be entered in the table (the change events on the form fields are used for some format checking, etc.). When all fields are entered, the “Add” button becomes enabled. When clicked, the underlying VBA code unprotects the Word document, adds a new row to the table, transfers the form field values to the new row, re-sorts the table, and then reprotects the document.
The problem is, the VBA code runs excrutiatingly slowly. If a monkey with it a little bit (e.g., unprotect it “manually” via the Word interface, go into the VBA code, and try again), it eventually runs through the routine very quickly, as I would expect it to. For the life of me, though, I can’t figure out what I’m doing to “breaks it loose” (and how to keep it that way). If I save the document (after it starts behaving), close, and re-open, it’s back to its sluggggggish behavior. Any ideas?
Thanks,