none
How to revoke/withdraw granted file access in VBA for MS Office 2016 for Mac RRS feed

  • Question

  • To access files with VBA in MS Office 2016 I have to grant access to them by calling GrantAccessToMultipleFiles with the appropriate file paths. More about this here: https://dev.office.com/blogs/VBA-improvements-in-Office-2016

    Is there a way to withdraw once granted access? I'm asking this to be able to test my VBA stuff.


    Sunday, March 6, 2016 5:01 PM

All replies

  • You can use SetAttr Function.

    ' Set hidden attribute.
    SetAttr("TESTFILE", vbHidden)   
    ' Set hidden and read-only attributes.
    SetAttr("TESTFILE", vbHidden Or vbReadOnly)

    It works in Windows OS. MAC you need to have a try.

    chanmm


    chanmm

    Sunday, March 6, 2016 10:21 PM
  • Thanks, but that's not what I need. This case is about sandboxing with OS X.
    Monday, March 7, 2016 8:18 AM
  • I have the same need.  Testing is awkward without the ability to revoke granted access.  I wonder if Ron de Bruin knows?
    Tuesday, August 9, 2016 3:46 AM