Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your code does not unlock any file...........it unprotects each
worksheet in a workbook and runs a spellcheck on that worksheet then re-protects. In the original workbook where did you store the macro? In a general module? You sure you saved as a macro-enabled workbook and that workbook is available to others? What are the macro security settings on the "others" computers? Should be set to "disable with notification". Gord On Tue, 8 May 2012 07:22:23 -0700 (PDT), Sandi Bredahl wrote: 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
including entire worksheet sort in a macro | Excel Discussion (Misc queries) | |||
Macro error when worksheet is protected | Excel Discussion (Misc queries) | |||
Macro in a protected worksheet | Excel Programming | |||
How can I run a macro in a protected worksheet? | Excel Worksheet Functions | |||
Protected worksheet and macro | Excel Programming |