Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
PLease Help!!!Formulas not updating and macros disappearing
Hello Everyone,
I have a pretty complex form that uses many tables, formfields, macros, etc. and I have two major problems: In one of the sections I have a table with number fields and formulas to calculate. B4*B5* in one field and B6 =if(B6=0,0,(B7*3)+b3) in another. In fact each column have the same relative formulas. They are set up as calculated formfields.....not just formulas in the cell. When first created they seemed fine, but now they do not update at all. The form is protected as it should be and I have a macro set at the end of the form to unprotect, spell check and I assumed update the calculation fields. It just no longer works. I thought there was a line of code in the macro that selected all of the document and updated, but it seems to have been taken out somehow. Here is the code behind the macro courtesy MVPs. Sub FormsSpellCheck() ' If document is protected, Unprotect it. If ActiveDocument.ProtectionType wdNoProtection Then ActiveDocument.Unprotect Password:="not2day" End If ' Set the language for the document. Selection.WholeStory Selection.LanguageID = wdEnglishUS ' Perform Spelling/Grammar check. If Options.CheckGrammarWithSpelling = True Then ActiveDocument.CheckGrammar Else ActiveDocument.CheckSpelling End If ' ReProtect the document. If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End If End Sub The second problem has to do with the template and all of its macros. This document of course has been saved as a template. All of the macros are stored in the template. A co-worker emailed me the template with suggested changes (Not tracking) and none of the macros were with the template. I have many macros for doing things like validation and adding new rows as well as the spell check macro. I do not understand why this is happening and how to stop it. We need many people to download this template and use it with macros intact. I have other forms and they were also emailed to me and they work fine. Please help!!!!!! |