Open Excel (Read Only) from Access

Hi

I am using GetObject method to open a specific excel file

Is there a way to set the excel file to read only while it is open from Access

The file needs to be read write so I can't set its properties to read only permanently

When it is open from Access I do not want it to be editable.

I have tried
objWorkbook.ChangeFileAccess Mode:=xlReadOnly

but I get an error
Vairable not defined (referring to xlReadonly)

I have changed the syntax but get anothe rmessage
"ChangeFileAccess methos of woorkbook class failed"

Any ideas please?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories