Solved Is there a way to 'test' if compact on close is on or off via VBA? (1 Viewer)

gojets1721

Registered User.
Local time
Today, 10:24
Joined
Jun 11, 2019
Messages
430
Bit of an odd question...I know you can set 'compact on close' on or off via VBA by utilizing Application.SetOption "Auto compact", True or Application.SetOption "Auto compact", False.

Is there a way in VBA to essentially test if 'compact on close' is on or off?

I.e. something like this:

Code:
If Application.SetOption "Auto compact" is True Then
'do something'
Else
'do something else'
End IF

Obviously this errors out on the first line but I'm not sure how to restructure it to get it to work, or if its even workable at all.

Thanks!
 

Josef P.

Well-known member
Local time
Today, 19:24
Joined
Feb 2, 2023
Messages
834
Code:
If Application.GetOption("Auto compact") then
...
;)
 

Users who are viewing this thread

Top Bottom