Share via

How do I enable Option Explicit in Excel for Mac version 16.68

Anonymous
2022-12-21T14:13:51+00:00

I need to create a dropdown that allows multiple selections from a list. I have the VBA code, but it doesn't function. The only thing I can see is that the VBA editor does not have the automatic "Option Explicit" at the top. I've tried manually typing it in, but no go. I don't have the options under Tools in the editor to enable the Option Explicit. Is there a way to work around this?

Microsoft 365 and Office | Excel | Other | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2022-12-27T14:01:55+00:00

    Thank you!

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Jim G 134K Reputation points MVP Volunteer Moderator
    2022-12-23T22:04:35+00:00

    Hi

    I wish these "Advisors" would actually try the follow the instructions they provide. Lionelhou's sleuthing almost got it right, but no cigar!!

    Yes, you need to change a setting in Excel's VB Editor's preferences, but the way to get to them is wrong in the explanations provided so far.

    You get to the VB Editor Preferences from the Menu Bar. Choose Excel > Preferences.

    This opens the dialog you need to change the setting in.

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-12-21T17:49:20+00:00

    Hello, I am Leonielhou, an Independent Advisor and a user like you, I am happy to help clarify any questions you may have.

    See if you can let Option Explicit be automatically in your newly created modules (recommended), by going in “Excel -> Preferences... -> Editor” and tick “Require variable declaration”.

    https://easyexcelvba.com/chapter_2.php#:~:text=If%20you%20want%20Option%20Explicit,tick%20%E2%80%9CRequire%20variable%20declaration%E2%80%9D.

    Thank you for your time and have a wonderful day. Cheers!

    Best, Leonielhou

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-12-21T17:59:29+00:00

    Thank you!

    I do not see an "Editor" option under preferences. There is an "Edit" option, but it does not mention Require variable declaration.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more