Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

spell check ranges in a do loop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daveh - 23 Feb 2007 15:31 GMT
I have a macro trying to spell check a number of discrete ranges ( not the
whole spread sheet). The range names are passed to the spell check sub
routine which uses the following lines of code

Application.Goto Reference:=Range(Address), scroll:=True
Application.union((activesheet.Range(Address)),
Activesheet.Range("A1").Checkspelling AlwaysSuggest:=True, SpellLang:=2057

The problem I have is that if there are 3 ranges (for example) I want to
spell check, it works fine for the first range, but doesn't work for the
later ranges.

I have checked the formatting of the cell ranges in the spreadsheet and thy
are all the same.

Thanks !

Daveh
Tom Ogilvy - 23 Feb 2007 15:38 GMT
Activesheet.Range("A1").Checkspelling AlwaysSuggest:=True, SpellLang:=2057

looks like it would only check spelling in cell A1.  

Why not have it check the spelling in the cell you want spell checked

Activesheet.Range("B9").Checkspelling AlwaysSuggest:=True, SpellLang:=2057

perhaps

or
Application.Goto Reference:=Range(Address), scroll:=True
Selection.Checkspelling AlwaysSuggest:=True, SpellLang:=2057

Signature

Regards,
Tom Ogilvy

> I have a macro trying to spell check a number of discrete ranges ( not the
> whole spread sheet). The range names are passed to the spell check sub
[quoted text clipped - 14 lines]
>
> Daveh
Daveh - 23 Feb 2007 15:55 GMT
Selection.checkspelling worked fine

thanks !

Dave

> Activesheet.Range("A1").Checkspelling AlwaysSuggest:=True, SpellLang:=2057
>
[quoted text clipped - 28 lines]
> >
> > Daveh
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.