• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code throws me a Run time 70 Permission denied.

carver

New Member
Hi all,

I am encountering something a little odd.

I used Excel 2011 for mac to create my spreadsheet.
It has some VBA in it, and until now, all worked well.
Then I installed Excel 2016 for Mac, and now, at a specific point in my code, see below,
it throws me out with a Runtime error 70: Permission denied.


shp1.Fill.UserPicture (ActiveWorkbook.Path & Application.PathSeparator & "labels" & Application.PathSeparator & Range("$C$6").Value & ".png")

Range value is a string that matches exactly the name of the file I want to use for the fill attributes.

That used to worked very well before.

Anyone would have any idea ?

Thanks a lot.

C.
 
Hi carver,

Based on the error message, I would check the folder path. Make sure that you can still access the folder, and/or that someone hasn't changed the folder name (e.g., folder is now called "labels here" rather than just "labels").
 
@carver
Have You checked what is that value with watch?
ActiveWorkbook.Path & Application.PathSeparator & "labels" & Application.PathSeparator & Range("$C$6").Value & ".png"
Do that value work with Safari?
 
@Luke: thanks for the reply, it's on my computer, I haven't changed anything. More over, the spreadsheet, when opened with Excel 2011 still works fine.
It's only with Excel 2016.

@vletm: thanks to you too for the answer. value isn't the problem, comes from a drop down list. I fail to see why you ask about Safari, it's an excel spreadsheet.
 
@carver
You didn't check 'value'? It would be the easiest first thing to check.
If that 'value', full path and file name, is someway wrong, one character wrong..., it won't work!
Sometimes different versions of Excel would give different values ...
I use Excel2011 that's why 'Safari'.
 
Back
Top