ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro help (https://www.excelbanter.com/excel-discussion-misc-queries/186720-macro-help.html)

Whitney

Macro help
 
I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



AKphidelt

Macro help
 
You have to initiate it somehow. Most likely by creating command button. Go to

View-- Toolbars -- Forms

Then click on the command button icon and when it opens up attach the macro
to it. So now when you click it, it will run the macro.

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



Tom Hutchins

Macro help
 
This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



Whitney

Macro help
 
Perfect!! That was very helpful. Thanks!

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



Whitney

Macro help
 
Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



Tom Hutchins

Macro help
 
Maybe something like

Sub Spell_Check()
Dim c As Range
On Error GoTo Cleanup
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="justme"
For Each c In ActiveSheet.UsedRange
If c.Locked = False Then
c.CheckSpelling SpellLang:=1033
End If
Next c
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Cleanup:
Application.ScreenUpdating = True
End Sub

Hope this helps,

Hutch

"Whitney" wrote:

Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated


Whitney

Macro help
 
That didn't work. The cursor flashes for a second and then nothing happens.

"Tom Hutchins" wrote:

Maybe something like

Sub Spell_Check()
Dim c As Range
On Error GoTo Cleanup
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="justme"
For Each c In ActiveSheet.UsedRange
If c.Locked = False Then
c.CheckSpelling SpellLang:=1033
End If
Next c
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Cleanup:
Application.ScreenUpdating = True
End Sub

Hope this helps,

Hutch

"Whitney" wrote:

Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated


Tom Hutchins

Macro help
 
Are you sure it didn't work? Were there any mis-spelled words for it to find?
When I tested this code , I put garbage text (non-words) and okay words in
both the unlocked and locked cells, with the sheet unprotected. Then I
protected the sheet and ran the macro. It showed me suggested corrections
only for the garbage text in the unlocked cells.

Hutch

"Whitney" wrote:

That didn't work. The cursor flashes for a second and then nothing happens.

"Tom Hutchins" wrote:

Maybe something like

Sub Spell_Check()
Dim c As Range
On Error GoTo Cleanup
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="justme"
For Each c In ActiveSheet.UsedRange
If c.Locked = False Then
c.CheckSpelling SpellLang:=1033
End If
Next c
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Cleanup:
Application.ScreenUpdating = True
End Sub

Hope this helps,

Hutch

"Whitney" wrote:

Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated


Whitney

Macro help
 
I think it might be the way my sheet is set up. It corrects a few cells, but
when it gets to a certain point, the screen just starts flashing and nothing
happens after that.

"Tom Hutchins" wrote:

Are you sure it didn't work? Were there any mis-spelled words for it to find?
When I tested this code , I put garbage text (non-words) and okay words in
both the unlocked and locked cells, with the sheet unprotected. Then I
protected the sheet and ran the macro. It showed me suggested corrections
only for the garbage text in the unlocked cells.

Hutch

"Whitney" wrote:

That didn't work. The cursor flashes for a second and then nothing happens.

"Tom Hutchins" wrote:

Maybe something like

Sub Spell_Check()
Dim c As Range
On Error GoTo Cleanup
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="justme"
For Each c In ActiveSheet.UsedRange
If c.Locked = False Then
c.CheckSpelling SpellLang:=1033
End If
Next c
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Cleanup:
Application.ScreenUpdating = True
End Sub

Hope this helps,

Hutch

"Whitney" wrote:

Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated


Tom Hutchins

Macro help
 
If you want to send me your workbook (with any confidential or sensitive
information removed), I will take a look at it. My email address is
hutch99999<remove this@yahoo<also this.com

Hutch

"Whitney" wrote:

I think it might be the way my sheet is set up. It corrects a few cells, but
when it gets to a certain point, the screen just starts flashing and nothing
happens after that.

"Tom Hutchins" wrote:

Are you sure it didn't work? Were there any mis-spelled words for it to find?
When I tested this code , I put garbage text (non-words) and okay words in
both the unlocked and locked cells, with the sheet unprotected. Then I
protected the sheet and ran the macro. It showed me suggested corrections
only for the garbage text in the unlocked cells.

Hutch

"Whitney" wrote:

That didn't work. The cursor flashes for a second and then nothing happens.

"Tom Hutchins" wrote:

Maybe something like

Sub Spell_Check()
Dim c As Range
On Error GoTo Cleanup
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="justme"
For Each c In ActiveSheet.UsedRange
If c.Locked = False Then
c.CheckSpelling SpellLang:=1033
End If
Next c
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Cleanup:
Application.ScreenUpdating = True
End Sub

Hope this helps,

Hutch

"Whitney" wrote:

Ok, I tried it and it seems to be working, however how do I limit it to just
the unlocked cells that data is entered into and not the locked cells.

For example:
A1 has Cons Name
B1 user enters the cons name

I only want it to spell check B1

"Tom Hutchins" wrote:

This article on Jon Peltier's site will be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Whitney" wrote:

I'm new to macros, could some explain how I can use this macro to allow spell
check when a sheet is protected?

Using a macro is the only work around that I know of.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Unprotects the sheet, does the spellcheck then reprotects the sheet.

"justme" can be changed to your password.


Gord Dibben MS Excel MVP


On Sun, 10 Feb 2008 14:32:00 -0800, Brian
wrote:

I made a spread sheet for work the has some cells protected then a password.
But once I enable the password, the spell check cannot be used.

Any help would be appreciated



All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com