Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

Thanks Gord.

Yes...my code was stolen for the forum for the wrap text with merged cells.
I'll try this. Is "justme" the password?

Gary

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

Yes, "justme" is a password.

You can change it in the code to one of your liking or have no password at all.

If you do change the PW make sure it is in quotes like "newpassword"
If none at all change to

ActiveSheet.Unprotect
ActiveSheet.Protect


Gord

On Thu, 25 Jan 2007 18:08:00 -0800, gwinder
wrote:

Thanks Gord.

Yes...my code was stolen for the forum for the wrap text with merged cells.
I'll try this. Is "justme" the password?

Gary

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

ViewToolbarsForms.

Click on the "Button" icon and draw a butoon on your worksheet.

Right-click and "assign macro".

Select the Spell_Check macro and OK.

Alternate method for putting a button on an existing Toolbar.

ToolsCustomizeCommands.

Scroll down to "Macros" and select.

Drag the smiley-face button to your toolbar and right-click and "assign macro"

You can also "rename" or "change button image" or "edit button image" if you
don't like the smiley or the word "Custom"


Gord

On Fri, 26 Jan 2007 16:57:01 -0800, gwinder
wrote:

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

Gord...you're brilliant...thank you. Works great but I don't get prompted
for the password?

Gary

"Gord Dibben" wrote:

ViewToolbarsForms.

Click on the "Button" icon and draw a butoon on your worksheet.

Right-click and "assign macro".

Select the Spell_Check macro and OK.

Alternate method for putting a button on an existing Toolbar.

ToolsCustomizeCommands.

Scroll down to "Macros" and select.

Drag the smiley-face button to your toolbar and right-click and "assign macro"

You can also "rename" or "change button image" or "edit button image" if you
don't like the smiley or the word "Custom"


Gord

On Fri, 26 Jan 2007 16:57:01 -0800, gwinder
wrote:

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

You wouldn't because you have used the password in the code at

ActiveSheet.Unprotect Password:="justme"

'do the spellcheck

ActiveSheet.Protect Password:="justme"

If you don't want others to see your code protect the VBAProject "lock project
for viewing" with another password.

Gord


On Sat, 27 Jan 2007 19:07:00 -0800, gwinder
wrote:

Gord...you're brilliant...thank you. Works great but I don't get prompted
for the password?

Gary

"Gord Dibben" wrote:

ViewToolbarsForms.

Click on the "Button" icon and draw a butoon on your worksheet.

Right-click and "assign macro".

Select the Spell_Check macro and OK.

Alternate method for putting a button on an existing Toolbar.

ToolsCustomizeCommands.

Scroll down to "Macros" and select.

Drag the smiley-face button to your toolbar and right-click and "assign macro"

You can also "rename" or "change button image" or "edit button image" if you
don't like the smiley or the word "Custom"


Gord

On Fri, 26 Jan 2007 16:57:01 -0800, gwinder
wrote:

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary









  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Spellcheck function in Protected Sheet

Thanks again...I protected the code under VBA Properties with a password but
I can still see the code without entering a password?

I went to View Code/Tools/VBA Project Properties/Protection

Clicked on Lock Project for Viewing and entered a password

In the General tab, am I suppoed to change the name of the project? Right
now it says VBAProject


Gary

"Gord Dibben" wrote:

You wouldn't because you have used the password in the code at

ActiveSheet.Unprotect Password:="justme"

'do the spellcheck

ActiveSheet.Protect Password:="justme"

If you don't want others to see your code protect the VBAProject "lock project
for viewing" with another password.

Gord


On Sat, 27 Jan 2007 19:07:00 -0800, gwinder
wrote:

Gord...you're brilliant...thank you. Works great but I don't get prompted
for the password?

Gary

"Gord Dibben" wrote:

ViewToolbarsForms.

Click on the "Button" icon and draw a butoon on your worksheet.

Right-click and "assign macro".

Select the Spell_Check macro and OK.

Alternate method for putting a button on an existing Toolbar.

ToolsCustomizeCommands.

Scroll down to "Macros" and select.

Drag the smiley-face button to your toolbar and right-click and "assign macro"

You can also "rename" or "change button image" or "edit button image" if you
don't like the smiley or the word "Custom"


Gord

On Fri, 26 Jan 2007 16:57:01 -0800, gwinder
wrote:

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary








  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Spellcheck function in Protected Sheet

Apologies for incomplete instructions.

After you lock the project for viewing you must save, close and reopen the
workbook before the "lock" takes place.

No, you don't have to change the name.


Gord


On Sun, 28 Jan 2007 06:41:01 -0800, gwinder
wrote:

Thanks again...I protected the code under VBA Properties with a password but
I can still see the code without entering a password?

I went to View Code/Tools/VBA Project Properties/Protection

Clicked on Lock Project for Viewing and entered a password

In the General tab, am I suppoed to change the name of the project? Right
now it says VBAProject


Gary

"Gord Dibben" wrote:

You wouldn't because you have used the password in the code at

ActiveSheet.Unprotect Password:="justme"

'do the spellcheck

ActiveSheet.Protect Password:="justme"

If you don't want others to see your code protect the VBAProject "lock project
for viewing" with another password.

Gord


On Sat, 27 Jan 2007 19:07:00 -0800, gwinder
wrote:

Gord...you're brilliant...thank you. Works great but I don't get prompted
for the password?

Gary

"Gord Dibben" wrote:

ViewToolbarsForms.

Click on the "Button" icon and draw a butoon on your worksheet.

Right-click and "assign macro".

Select the Spell_Check macro and OK.

Alternate method for putting a button on an existing Toolbar.

ToolsCustomizeCommands.

Scroll down to "Macros" and select.

Drag the smiley-face button to your toolbar and right-click and "assign macro"

You can also "rename" or "change button image" or "edit button image" if you
don't like the smiley or the word "Custom"


Gord

On Fri, 26 Jan 2007 16:57:01 -0800, gwinder
wrote:

Gord...could you explain exactly how to assign the Spell_Check macro to a
button please?

Thanks,\Gary

"Gord Dibben" wrote:

That is worksheet event code and I presume you have it in a sheet module.

It fires whenever you enter text into merged cells.

I misspoke in my first post.

You don't want to run spellcheck every time the event code fires so I would just
assign the Spell_Check macro to a button and run it whenever you choose.


Gord

On Thu, 25 Jan 2007 18:19:00 -0800, gwinder
wrote:

Gord....here's the code I have which is under Microsoft Excel Object, not a
module

So where would I put the spellcheck code? and how does a user activate the
spell check?

Thanks,

Gary

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
End If
End With
End Sub

"Gord Dibben" wrote:

Gary

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

Where in your code would it go?

Can't see your code so have no idea.

I assume the word wrap code is event code. Right?

You could run it by calling from your current code.

Just insert the line Spell_Check at a point you feel is appropriate.

Place the Spell_Check macro in a general module.


Gord Dibben Excel MVP

On Thu, 25 Jan 2007 10:03:01 -0800, gwinder
wrote:

I have created an employee review form that contains code which enables text
wrap in merged cells. I have protected the sheet but this disables the
spellcheck functionality. I've seen some threads where you can insert code
to allow spellcheck to work but where in the code would this go? At the end
of my exisiting code? At the beginning?

Thanks,

Gary









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
Find Function not working on protected sheet Hippy Excel Worksheet Functions 1 December 14th 06 03:14 PM
show all function with sheet protected [email protected] Excel Discussion (Misc queries) 9 July 25th 06 06:01 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Using the Indirect function with a sheet number instead of a sheet name JDB Excel Worksheet Functions 5 December 31st 05 03:03 PM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM


All times are GMT +1. The time now is 08:26 AM.

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"