Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spell Check... active cell only 1

Status
Not open for further replies.

itsthecheese

Programmer
Jul 25, 2006
7
US
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 :)
 
change ActiveCell.Select.CheckSpelling to ActiveCell.CheckSpelling and i think you'll be good to go.



mr s. <;)

 
Thank you SOOOOOO much... It works perfectly :)

- Ellie

" drive slow ... steer fast
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top