View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Run a macro automatically on workbook open

You could add a single line to the top of your procedu


Option Explicit
Sub auto_open()
If ThisWorkbook.ReadOnly Then Exit Sub

'your normal code here
End Sub

(or workbook_open if you used that)

tweacle wrote:

I have a workbook which is networked. Im trying to include a macro that
will automatically run when the workbook is opened in read/write format
but will not run when its read only.

I understand macro's but aint got a clue on how to do this if it can be
done. If it can could I poss have a idiot proof guide.

Many Thanks

--
tweacle


--

Dave Peterson