Running Macro in Read Only Workbook

katmarie

New Member
Joined
Aug 16, 2022
Messages
2
Platform
  1. Windows
Hello All

I maintain a workbook that is saved on a network drive so that others have read access only, and I have full access.

The workbook is configured with a macro that forces users to Enable Content via a splash sheet when the document is opened. I have created the macro using the following tutorial/code: Make Users Enable Macros in Order to View a Workbook in Excel - TeachExcel.com

[ICODE]Private Sub Workbook_Open()[/ICODE]

[ICODE]'worksheets to show when macro is enabled[/ICODE]

[ICODE]Sheets("Data").Visible = True[/ICODE]

[ICODE]'worksheet that shows reminder to enable macro[/ICODE]

[ICODE]Sheets("Reminder").Visible = xlVeryHidden[/ICODE]

[ICODE]End Sub[/ICODE]

[ICODE]Private Sub Workbook_BeforeClose(Cancel As Boolean)[/ICODE]

[ICODE]'worksheet with reminder[/ICODE]

[ICODE]Sheets("Reminder").Visible = True[/ICODE]

[ICODE]'worksheets to show when macro is enabled[/ICODE]

[ICODE]Sheets("Data").Visible = xlVeryHidden[/ICODE]

End Sub


The macro runs fine for me when I open the document due to having full access, however others in my team do not get the "Reminder" page when the document is opened. Assuming I need some sort of code to force the Reminder page to be shown even if the document is opened in Read Only?

Any help would be great! :)

Kat
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi,

Macros should basically work even if they open the file in the Read Only mode. Of course, they cannot save it, but they can run the macro. However, if they don't have access rights, of course, the macro doesn't work as intended. It may be that the access rights have not been set properly.

Just an idea. How about every time saving the document showing the "Reminder" page (when you save the book) so that others in your team can see that page when they open the file even in Read-Only mode or macro is disabled?
 
Upvote 0

Forum statistics

Threads
1,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top