View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default Storing macros in one workbook

Add the macro to your personal.xls workbook and then
hide (window, hide) the personal.xls workbook. It will
be availablt to all open workbooks as personal.xls!Protect_All_Sheets

For more information see
http://www.mvps.org/dmcritchie/excel/install.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"DeeW" wrote in message ...
I followed the instructions posted to Protect All Worksheets in a Workbook:

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect password:="123"
Next ws
End Sub

This worked well. Now I need to add this to the Personal Macros Workbook so
that it is accessible for other workbooks. How can this be done?