![]() |
|
|
Thread Tools | Display Modes |
#4
|
||||
|
||||
![]()
Basically you would use your close macro to set the document variable e.g.
Code:
Private Sub BtnExitl_Click() ThisDocument.Variables("varShow").value = "True" ThisDocument.Save Application.Quit End Sub Code:
Private Sub Document_Open() Dim oVar As Variable Dim bVar As Boolean For Each oVar In ThisDocument.Variables If oVar.Name = "varShow" Then If oVar.value = "True" Then bVar = True Exit For End If End If Next oVar If bVar = False Then UserForm1.Show End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA in Word 2010 to show certain text only when a YES checkbox is checked | kdsim | Word VBA | 0 | 05-16-2018 05:16 AM |
![]() |
pdxplorer | Mail Merge | 11 | 12-20-2017 12:37 PM |
Checkboxes are unchecked in Listbox that were checked off before.How can I stop this? | Rochelle711 | Excel Programming | 0 | 06-22-2014 06:16 PM |
![]() |
Dolfie_twee | Word VBA | 1 | 06-22-2010 07:54 AM |
Excel 2003 will not terminate with application.quit | Peter Schellenbach | Excel | 12 | 03-14-2006 05:28 PM |