Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 03-25-2018, 12:11 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by swenniels View Post
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 View Post
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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Word 2016 for Mac] SKIPIF condition doesn't work rschnell Mail Merge 3 10-19-2017 02:01 PM
Word 2016 - Delete all Tab stops avonw Word 6 10-07-2017 01:22 PM
Slicer built in 2016 doesn't work in 2013 cdoody Excel 0 10-31-2016 10:25 AM
upgrading from word 2011 to word 2016 classicdining Word 1 07-01-2016 04:37 PM
Word 2007 Font Color Doesn't Work nnicko Word 2 04-16-2010 01:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft