Automate Spell Check

G

Gary

Is there a way to have Spell Check run when you close the workbook, similar
to having it run when you click send on an email?

Thanks.
 
C

CLR

That would take a Workbook Before Close, or Before Save macro.......if that
is what you want, post back and someone will help

Vaya con Dios,
Chuck, CABGx3
 
G

Gary

Yes, please. Whatever anyone can help with.

This is for a file that always goes to the customer and we've been
embarrassed a bit lately.
 
C

CLR

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cells.CheckSpelling CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False _
, AlwaysSuggest:=True
End Sub

Vaya con Dios,
Chuck, CABGx3
 
G

Gary

I right-clicked on the tab, clicked View Code, and placed it there. However,
nothing happens even when I know there are mispellings.

Any ideas?
 
C

CLR

Hi Gary.....
It goes in the "This Workbook" module, not a "Sheet " Module..........if you
would like it in a Sheet Module, then you could use this one to activate each
time you switched away from that sheet.

Private Sub Worksheet_Deactivate()
Cells.CheckSpelling CustomDictionary:="CUSTOM.DIC", _
IgnoreUppercase:=False _
, AlwaysSuggest:=True
End Sub


Vaya con Dios,
Chuck, CABGx3
 
G

Gary

Thanks. Working fine.

I appreciate the help.

CLR said:
Hi Gary.....
It goes in the "This Workbook" module, not a "Sheet " Module..........if you
would like it in a Sheet Module, then you could use this one to activate each
time you switched away from that sheet.

Private Sub Worksheet_Deactivate()
Cells.CheckSpelling CustomDictionary:="CUSTOM.DIC", _
IgnoreUppercase:=False _
, AlwaysSuggest:=True
End Sub


Vaya con Dios,
Chuck, CABGx3
 
C

CLR

You're welcome............thanks for the feedback.

Merry Christmas to you and yours..........

Vaya con Dios,
Chuck, CABGx3
 
Top