Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Storing macros in one workbook

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing all macros in one workbook MissyLovesExcel Excel Programming 4 December 2nd 08 01:28 PM
storing macros ? Tim[_7_] Excel Discussion (Misc queries) 2 October 26th 07 02:54 AM
Storing Macros jc lewis Excel Programming 1 June 28th 04 01:30 PM
storing global macros Halski Excel Programming 1 April 21st 04 05:40 AM
Storing macros outside of Excel VB SwiftCode Excel Programming 1 October 17th 03 02:27 AM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"