B
BobV
Group:
How do I save a change I made to a menu item through the following VBA
subroutine? The code below will put a checkmark next to the following menu
item: Switchboard Menu > Options > Compact Database Before Exit
However, the change is not saved by my sub. What is the VBA statement to
save the change I made to the Switchboard Menu before the user exits from my
application?
Thanks,
BobV
'COMPACT ON EXIT
Sub CompactOnExit()
CommandBars("Switchboard
Menu").Controls("Options").CommandBar.Controls("Compact Database Before
Exit").State = msoButtonDown
CommandBars("Switchboard
Menu").Controls("Options").CommandBar.Controls("Do Not Compact Database
Before Exit").State = msoButtonUp
Application.SetOption "Auto Compact", True
End Sub
How do I save a change I made to a menu item through the following VBA
subroutine? The code below will put a checkmark next to the following menu
item: Switchboard Menu > Options > Compact Database Before Exit
However, the change is not saved by my sub. What is the VBA statement to
save the change I made to the Switchboard Menu before the user exits from my
application?
Thanks,
BobV
'COMPACT ON EXIT
Sub CompactOnExit()
CommandBars("Switchboard
Menu").Controls("Options").CommandBar.Controls("Compact Database Before
Exit").State = msoButtonDown
CommandBars("Switchboard
Menu").Controls("Options").CommandBar.Controls("Do Not Compact Database
Before Exit").State = msoButtonUp
Application.SetOption "Auto Compact", True
End Sub