Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DaveyC4S
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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


Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything




  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything


--

Dave Peterson
  #3   Report Post  
DaveyC4S
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

Does this mean it is impossible to use spell check in a protected and shared
workbook?

"Dave Peterson" wrote:

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

I think it's impossible to use that version of spellcheck in a protected
worksheet in a shared workbook.

But there is an application.spellcheck (see VBA's help) that will check word by
word.

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range
Dim mySplit As Variant
Dim iCtr As Long
Dim AllWordsOk As Boolean

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
mySplit = Split(myCell.Value, " ")
AllWordsOk = True
For iCtr = LBound(mySplit) To UBound(mySplit)
If Application.CheckSpelling(mySplit(iCtr)) = False Then
AllWordsOk = False
Exit For
End If
Next iCtr
If AllWordsOk Then
'do nothing
Else
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If

Next myCell
End With

End Sub

I split the value in each cell by a space character. This may not be sufficient
for your data.


DaveyC4S wrote:

Does this mean it is impossible to use spell check in a protected and shared
workbook?

"Dave Peterson" wrote:

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
DaveyC4S
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

Thanks Dave

Although not ideal it is better than no spell check.

Best regards
Dave

"Dave Peterson" wrote:

I think it's impossible to use that version of spellcheck in a protected
worksheet in a shared workbook.

But there is an application.spellcheck (see VBA's help) that will check word by
word.

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range
Dim mySplit As Variant
Dim iCtr As Long
Dim AllWordsOk As Boolean

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
mySplit = Split(myCell.Value, " ")
AllWordsOk = True
For iCtr = LBound(mySplit) To UBound(mySplit)
If Application.CheckSpelling(mySplit(iCtr)) = False Then
AllWordsOk = False
Exit For
End If
Next iCtr
If AllWordsOk Then
'do nothing
Else
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If

Next myCell
End With

End Sub

I split the value in each cell by a space character. This may not be sufficient
for your data.


DaveyC4S wrote:

Does this mean it is impossible to use spell check in a protected and shared
workbook?

"Dave Peterson" wrote:

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

Hope you're still there.

I checked each word (separated by a space). You don't need to go to that level:

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
If Application.CheckSpelling(myCell.Value) = False Then
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If
Next myCell
End With

End Sub




DaveyC4S wrote:

Thanks Dave

Although not ideal it is better than no spell check.

Best regards
Dave

"Dave Peterson" wrote:

I think it's impossible to use that version of spellcheck in a protected
worksheet in a shared workbook.

But there is an application.spellcheck (see VBA's help) that will check word by
word.

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range
Dim mySplit As Variant
Dim iCtr As Long
Dim AllWordsOk As Boolean

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
mySplit = Split(myCell.Value, " ")
AllWordsOk = True
For iCtr = LBound(mySplit) To UBound(mySplit)
If Application.CheckSpelling(mySplit(iCtr)) = False Then
AllWordsOk = False
Exit For
End If
Next iCtr
If AllWordsOk Then
'do nothing
Else
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If

Next myCell
End With

End Sub

I split the value in each cell by a space character. This may not be sufficient
for your data.


DaveyC4S wrote:

Does this mean it is impossible to use spell check in a protected and shared
workbook?

"Dave Peterson" wrote:

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
DaveyC4S
 
Posts: n/a
Default Spell Check in Protected Worksheet & Shared Workbook

Dave

Yes I am still here; thanks very much for the simpler version.

Best regards
Dave

"Dave Peterson" wrote:

Hope you're still there.

I checked each word (separated by a space). You don't need to go to that level:

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
If Application.CheckSpelling(myCell.Value) = False Then
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If
Next myCell
End With

End Sub




DaveyC4S wrote:

Thanks Dave

Although not ideal it is better than no spell check.

Best regards
Dave

"Dave Peterson" wrote:

I think it's impossible to use that version of spellcheck in a protected
worksheet in a shared workbook.

But there is an application.spellcheck (see VBA's help) that will check word by
word.

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myCell As Range
Dim mySplit As Variant
Dim iCtr As Long
Dim AllWordsOk As Boolean

Set wks = ActiveSheet

With wks
For Each myCell In .UsedRange.Cells
If myCell.Locked = True Then
'do nothing
Else
mySplit = Split(myCell.Value, " ")
AllWordsOk = True
For iCtr = LBound(mySplit) To UBound(mySplit)
If Application.CheckSpelling(mySplit(iCtr)) = False Then
AllWordsOk = False
Exit For
End If
Next iCtr
If AllWordsOk Then
'do nothing
Else
MsgBox "Please fix cell: " & myCell.Address(0, 0)
End If
End If

Next myCell
End With

End Sub

I split the value in each cell by a space character. This may not be sufficient
for your data.


DaveyC4S wrote:

Does this mean it is impossible to use spell check in a protected and shared
workbook?

"Dave Peterson" wrote:

You can't change protection of a worksheet in a shared workbook.

DaveyC4S wrote:

I have successfully used the code from a previous discussion post to activate
the spell check function in a protected worksheet.

However when I share the workbook and run the macro the error: "400"
appears. When I go to the Help option the help screen is blank.

Does anyone have any idea how I can use the spell check in a protected
worksheet within a shared workbook?

The code used from the previous discussion is shown below.

Many thanks
Dave

Cats

Requires VBA to unprotect the sheet, do the spellcheck then reprotect the
sheet.

Similar to.......

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

Gord Dibben Excel MVP

On Wed, 16 Feb 2005 11:05:06 -0800, "Cats"
wrote:

Office 2003 - Excel
I am trying to make it possible for personnel to spell check information
they insert, in a unlocked cell in a password protected worksheet. I have
tried everything I can find in all HELP areas, but cannot find anything

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

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
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
grand total column B from every worksheet in workbook igor Excel Discussion (Misc queries) 2 February 23rd 05 08:42 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
How use group and ungroup functions while worksheet is protected Gabriel De la Garza Excel Worksheet Functions 1 November 17th 04 01:44 AM


All times are GMT +1. The time now is 12:09 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"