vba courses london - cannot savecopyas another folder

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Cannot SaveCopyAs to another folder

vba courses london - Cannot SaveCopyAs to another folder

resolvedResolved · Low Priority · Version Standard

Simon has attended:
Excel VBA Intro Intermediate course

Cannot SaveCopyAs to another folder

Dear Sir/Madam,

I am using the SaveCopyAs method to save a copy of a spreadsheet to another location which is in another folder.

When I run the procedure, it opens the spreadsheet but then produces an error message :Run Time Error 1004, Cannot access read-only document 'folder name".

Is there any way around this. If you right click the folder and go to properties and un-check Read-Only then go back to properties, the box is checked again.

Any help would be appreciated.

If you need any more info please let me know.

Kind Regards,

Simon.

RE: Cannot SaveCopyAs to another folder

Simon

You need to add the following codeline to your code

ReadOnlyRecommended:=False

This deselects the ReadOnly option

Carlos

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

VBA tip:

Suspend DisplayAlerts in VBA

To stop Excel asking you things like "Do you want to delete this file...", use the following line of code at the beginning of the relevant VBA procedure:

Application.DisplayAlerts = False

At the end of the procedure make sure you use the following code to reactivate Display Alerts:

Application.DisplayAlerts = True

View all VBA hints and tips


Server loaded in 0.08 secs.