+ Reply to Thread
Results 1 to 16 of 16

excel macro: permission denied (error 70). Strange behaviour

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    excel macro: permission denied (error 70). Strange behaviour

    Hi,
    I have a problem with Excel macros. I have several files containing macro (saved as macro-enabled files), they run correctly on some windows vista pcs and windows seven pcs.
    Recently I formatted two pcs with Windows 7 Pro, installed Office 2007 and performed updates. When I run macro on these pcs, i get "permission denied, runtime error 70", I activated debug mode and I noticed that the error comes at the first line that tries to read a cell; in fact, if I run a macro with only a messagebox popup, it runs correctly, so it seems really some kind of missing permission on the sheet. I checked in excel trusted settings and everything is unlocked and permitted. I tried to disable UAC with no luck. I tried to open excel with administrator account and with normal user account, the behaviour is the same.
    So I'm trying to understand what pcs running and pc not running macro may have in common, but they are very different (different op sys, 32 and 64bit, updates level) so I really don't know what to do. The only thing I can notice is that macros don't run in pcs formatted recently. These windows installation has been performed normally, without particular customization or peculiarity.
    Pcs are under domain, but there have never been particular policies about excel or other policies that could hurt this subject. Can someone give me an idea?
    Last edited by kappa85; 03-07-2013 at 06:05 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: excel macro: permission denied (error 70). Strange behaviour

    It's difficult without see anything
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    I don't think the code will help. By the way, below you can find photo of the error and the vba code.
    http://img825.imageshack.us/img825/7564/fotoap.jpg
    http://img593.imageshack.us/img593/3919/foto1ont.jpg

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: excel macro: permission denied (error 70). Strange behaviour

    a sample file will help

  5. #5
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    What kind of sample file? You can find the code that raises the error in the photo of the previous post.
    It's very silly code. Also a simple instruction to select a cell raises the error. While an instruction that shows a messagebox doesn't.

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: excel macro: permission denied (error 70). Strange behaviour

    Are you doing this in a new excel file or one that you have been using for a long time? If the latter, then the vba code itself may have become corrupted. MVP Orlando has a program to clean up the code, and there is a popular add-in called code cleaner that creates the modules.

    Hope this helps.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  7. #7
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    Hi,
    thank you for your reply. It happens both if I use an old file (created probably with Office 2003 on WinXp) or if I create a new file. Furthermore, the macro in the "old" file runs fine on a lot of other PCs with Vista and Seven, so I think the file is not corrupt I can't understand what these new PCs have different from other Seven PCs.

  8. #8
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: excel macro: permission denied (error 70). Strange behaviour

    Hi -

    quick question. are you running 32bit office in 64 bit win7?

    event

  9. #9
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    Quote Originally Posted by event21 View Post
    Hi -
    quick question. are you running 32bit office in 64 bit win7?
    event
    Hi,
    I have Office 32bit and it runs on Vista 32bit, Seven 32bit and Seven 64bit, but I think it isn't relevant because on some Seven 64bit the macro runs well, while in others it fails.
    What do you suggest?

  10. #10
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: excel macro: permission denied (error 70). Strange behaviour

    Hi -

    can you run this
    Please Login or Register  to view this content.
    in DCOM Config, look for Microsoft Excel Application, right click> properties and post the security tab setting you have.

    event

  11. #11
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: excel macro: permission denied (error 70). Strange behaviour

    Hi -

    can you run this
    Please Login or Register  to view this content.
    in DCOM Config, look for Microsoft Excel Application, right click> properties and post the security tab setting you have.

    event

    too fast: MODS, for deletion (double post)
    Last edited by event21; 03-07-2013 at 10:08 AM.

  12. #12
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    message edited
    sorry
    Last edited by kappa85; 03-07-2013 at 10:17 AM.

  13. #13
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    Quote Originally Posted by event21 View Post
    Hi -
    can you run this
    Please Login or Register  to view this content.
    in DCOM Config, look for Microsoft Excel Application, right click> properties and post the security tab setting you have.
    The configuration is the same in all PCs:
    launch and activation: default
    access: default
    configuration: custom (here, same users have the same rights)
    Last edited by kappa85; 03-08-2013 at 04:27 AM.

  14. #14
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    This morning I setup two new notebooks with Windows Seven Professional 64bit. Installed Office 2007 32bit with SP3 and installed all windows updates. Tried my workbook containing macro: permission denied

  15. #15
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: excel macro: permission denied (error 70). Strange behaviour

    Hi -

    again, in the DCOM, can you right click My Computer > properties > COM security > Edit Default

    see if the admin and other users has a permission

    event

  16. #16
    Registered User
    Join Date
    03-07-2013
    Location
    italy
    MS-Off Ver
    2007
    Posts
    9

    Re: excel macro: permission denied (error 70). Strange behaviour

    Yes, the current user has local and remote access.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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