View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default macro to restrict access

What if the file is not being edited at this time?


Gord Dibben MS Excel MVP

On Thu, 22 Jan 2009 11:19:02 -0800, Terielad
wrote:

Excellant Thanks.



"CFS" wrote:

Use a Workbook event:

Private Sub Workbook_Open()
MsgBox "This file is being edited you cannot access this at this time"
ThisWorkbook.Close False
End Sub

--
CFS


"santaviga" wrote:

Hi,

I am looking for a macro to run in an excel file so that when you open the
file it pops up with a message, this file is being edited you cannot access
this at this time and when you press ok the excel file will close.

Can any one give me some help on this.

Regards