Automatically preset View & Enable Macros for other users

cgrulk

New Member
Joined
Jun 16, 2020
Messages
10
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone,
Two Questions here:

Question 1: I made a program to test data in excel for work that I want to have set up with certain view settings (hide formula bar, gridlines, etc.). The purpose of this workbook is to be shared with a group of people and the workbook looks fine when I look at it on my computer, but when I open the document on another user's computer they go to the default Excel settings. Is there a way to easily set the default view settings for a workbook for other users when the open the workbook? I imagine there is maybe a way i could program a macro, but that leads to my next question.

Question 2: Also, when I open the workbook on another user's computer a message comes up that macros have been disabled and need to be enabled. All they have to do is press "Enable" and they work fine, but I would like them to just automatically be enabled to avoid someone not enabling them. Is there a way to automatically enable the macros for a workbook that is shared with other people or will I just have to make sure other users click "Enable" when they first open the document?

Thanks in advance!
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,490
You can't auto enable a workbook, they need to do this. It's a safety feature as Macros can contain harmful code.

Adding this code to the 'This Workbook' module, will run the code once enabled'

VBA Code:
Private Sub Workbook_Open()

'your code here

End Sub

Maybe try recording a macro with all your updates to the standard book and insert it into the 'your code here' section.
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,805
And the first question can be done by defining and recalling a custom View
 

Watch MrExcel Video

Forum statistics

Threads
1,114,652
Messages
5,549,206
Members
410,905
Latest member
Extjel
Top