+ Reply to Thread
Results 1 to 2 of 2

Grant File Access macro

  1. #1
    Registered User
    Join Date
    12-06-2021
    Location
    Scotland
    MS-Off Ver
    365 (Mac)
    Posts
    9

    Grant File Access macro

    Hello,

    I am using Excel for Mac and have written a macro that goes into 51 different Excel files, all stored on Dropbox, copies a range, pastes it into a single location and closes the files without saving.
    The macro works fine but I get a message asking me to "Grant File Access". I then manually have to click "grant access".

    I understand that this occurs because Office for Mac apps are sandboxed. I also understand that once permission has been granted, this is stored and should not need to be given again, however, this is not the case - I continue to be asked to grant access to files. It does not ask me to grant access for every file each time I run the macro but it does ask for access to a handful of files every 4-5 times the macro is run (sometimes more frequently).

    Is there anyway I can build in a step in the macro that automatically grants access so I can leave the macro running without manual input?


    I have seen the below offered as a solution...

    Please Login or Register  to view this content.
    ...however, this would require me to list the 51 file names in the macro (?). Currently my code is written as below with a list of the 51 file names held in excel which then get used in a loop.

    Please Login or Register  to view this content.

    Any help is appreciated!




    (I am aware the we are not supposed to "inquire about breaking the security of a protected workbook". As I understand it, my question does not break this forum rule, apologies if it does!)

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: Grant File Access macro

    I don't have a Mac, but I suppose the code might look like this:
    Please Login or Register  to view this content.
    I'm just wondering, how did you fit 51 filenames in the range D3: D45 (that is 43 cells)?

    Artik

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How do I open .mdb file in Access by using macro in Excel?
    By megtoma in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-17-2014, 08:14 AM
  2. Use an Excel Macro in Access VBA - Import text file in Access Table
    By joogibabu in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-08-2014, 10:04 AM
  3. Replies: 3
    Last Post: 12-18-2012, 07:43 AM
  4. Macro to access file menu
    By Treadwsp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2012, 10:11 AM
  5. Macro to open Access file
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2012, 11:11 AM
  6. [SOLVED] Help! Security when using a VBA macro to access an Excel File
    By biker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2006, 12:30 AM
  7. [SOLVED] How do I grant access to allow a user to save an Excell file to t
    By TomK in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 04-26-2006, 01:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1