Quote:
Originally Posted by swenniels
But Macro part 2 interacts with "varMerk42"... and macro part 3 should delete this variable.
|
But what has that got to do with what's going on in your part 1 macro, which is where you said the problem manifests?
Quote:
Originally Posted by swenniels
I then close the document, re open it and get the next symptom with Macro part 1, but then symptom number 6 comes up instead of number 1, because the variable "varMerk42" has not been put to 0
|
To test, add the following code to the 'ThisDocument' code module of the document or its template
Code:
Private Sub Document_Open()
Const MyVar As String = "varMerk42"
On Error GoTo NoVariable
MsgBox MyVar & " has the value: " & ActiveDocument.Variables(MyVar).Value, vbOKOnly
Exit Sub
NoVariable:
MsgBox MyVar & " has been deleted.", vbOKOnly
End Sub