View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Locking a Workbook

ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

--
Regards,
Tom Ogilvy

"Patrick Simonds" wrote in message
...
I have a Workbook which has an Auto_Open Macro. The Auto_Open macro

displays
a dialogbox which asks "Open as Read Only" or "Edit File". If they

select
Open as Read Only I want one of two things. Either make the Workbook Read
Only or disable their ability to save the Workbook.

If they select Edit File, they are asked for a password and then taken

into
the Workbook where they are allowed to make and save changes (this part is
working fine).