LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default including macro in protected worksheet

I have an excel 2007 spreadsheet that is protected. I found the
following macro that will allow other people to run spell check:

Sub Macro1()
Dim WS As Worksheet
Application.ScreenUpdating = False
For Each WS In ActiveWorkbook.Worksheets
WS.Select
ActiveSheet.Unprotect Password:="password"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="password"
Next WS
Application.ScreenUpdating = True
End Sub

It unlocks file, runs spell check and locks file no problem. I save
the file as an Excel-Enabled worksheet - and expected the macro to
magically be included with the spreadsheet to whoever's computer and
work just as flawlessly.

I thought that when the "other" person opens the file, they would get
a security message that would give them the option of running the
macro. BUT IT DOESN'T! And the macro isn't with the file anymore.

Please help. What did I do wrong. This is driving me nuts.
 
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
including entire worksheet sort in a macro PatD Excel Discussion (Misc queries) 2 July 10th 09 06:40 PM
Macro error when worksheet is protected Soroya1920 Excel Discussion (Misc queries) 2 August 27th 07 06:42 PM
Macro in a protected worksheet PA Excel Programming 4 April 25th 06 04:19 AM
How can I run a macro in a protected worksheet? Husker87 Excel Worksheet Functions 2 March 30th 05 11:14 PM
Protected worksheet and macro Massimiliano Alberti Excel Programming 1 October 30th 03 01:00 PM


All times are GMT +1. The time now is 09:45 AM.

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

About Us

"It's about Microsoft Excel"