Excel 2013 Macro to force enable macros each time workbook is opened (.xlsb or .xlsm)

Looking for a Excel 2013 macro for an .xlsb and .xlsm workbooks that will hide all sheets and force user to enable macros every time they open they open the workbook so they can see the hidden pages.
Sandra FrongilloSenior Business AnalystAsked:
Who is Participating?
 
Roy CoxGroup Finance ManagerCommented:
Try this

Option Explicit was in the wrong place and some declarations too.
TEST--1-.xlsm
0
 
Roy CoxGroup Finance ManagerCommented:
I have an example at home, but here's a good article by Chip Pearson
0
 
Sandra FrongilloSenior Business AnalystAuthor Commented:
I tried that code but it keeps bugging out here:

ThisWorkbook.Worksheets(C_INTRO_SHEETNAME).Visible = xlSheetVisible
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Sandra FrongilloSenior Business AnalystAuthor Commented:
Then when I reopen the macro bugs out here:
Private Sub Workbook_Open()
0
 
Roy CoxGroup Finance ManagerCommented:
Can you post your workbook. I'll post my example when I get home if I can't fix yours
0
 
Sandra FrongilloSenior Business AnalystAuthor Commented:
Here's the test file I was using
TEST.xlsm
0
 
Sandra FrongilloSenior Business AnalystAuthor Commented:
That works!!!  Thanks!!!
0
 
Sandra FrongilloSenior Business AnalystAuthor Commented:
THAT's AWESOME!!!  Thanks a million !!!
0
 
Roy CoxGroup Finance ManagerCommented:
Pleased to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.