itsthecheese
Programmer
re: thread707-1087775
I am new to vba and picking it up quickly... I have a protected document and have set up a command button to unprotect the document, perform a spell check, then re-protect. Problem is my user requests that I set this up to spell check cell contents only - not the entire worksheet.
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect "xxx"
Worksheets("Sales Issues").CheckSpelling AlwaysSuggest:=True
ActiveSheet.Protect Password:="xxx", DrawingObjects:=True, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingRows:=True, _
AllowInsertingRows:=True, AllowDeletingRows:=False, AllowSorting:=True
End Sub
I've also tried to modify the "Worksheets..." line above to
ActiveCell.Select.CheckSpelling AlwaysSuggest:=True
this has obviously failed my simple thinking. Your assistance is appreciated
I am new to vba and picking it up quickly... I have a protected document and have set up a command button to unprotect the document, perform a spell check, then re-protect. Problem is my user requests that I set this up to spell check cell contents only - not the entire worksheet.
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect "xxx"
Worksheets("Sales Issues").CheckSpelling AlwaysSuggest:=True
ActiveSheet.Protect Password:="xxx", DrawingObjects:=True, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingRows:=True, _
AllowInsertingRows:=True, AllowDeletingRows:=False, AllowSorting:=True
End Sub
I've also tried to modify the "Worksheets..." line above to
ActiveCell.Select.CheckSpelling AlwaysSuggest:=True
this has obviously failed my simple thinking. Your assistance is appreciated