Producing PDF files on Mac VBA : Issues with locked Project Properties

Ian-Mitch

New Member
Joined
Mar 18, 2013
Messages
1
Hi all - first post, love the site and thanks for all the great tips so far. Have used it a lot!

On the Mac (Excel 2011), I need to protect my VBA/macros from being able to be viewed. So, I have set the VBA Project Properties to 'locked' on the VBA (I know its not very security tight, but adequate for most of my users). All good so far.

My problem arises when I try to write a PDF workbook into one PDF file. I used Ron de Bruin's (very helpful) tip/workaround here: VBA code in Excel 2011 for the Mac (as the usual PC command ExportAsFixedFormatdoesnt work/has a bug). BUT for some reason I can only write a PDF combined file when the Project Properties are set to unlocked. Dont ask me why, but when its unlocked it works, when its locked it doesnt.

So, either
a) any suggestions for a fix or
b) is there a way to unlock the project properties at the start of a subroutine/macro and re-lock it at the end of a subroutine/macro?

Hope makes sense and any help gratefully received. I have been trying to fix this for days, and am getting desperate :)

thanks in advance, Ian
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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