Results 1 to 5 of 5

Spellcheck failing to get called twice

Threaded View

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    Manchester
    MS-Off Ver
    2010
    Posts
    2

    Spellcheck failing to get called twice

    ' MyRangeSpell.CheckSpelling line of code works for first not for second With Block
    Public Sub AutoSpellCheck()
    
    Dim wdApp As Object
        Dim wdDoc As Object
        Dim wdRng As Object
        Dim wdRngIndex As Object
        Dim MyRangeSpell As Range
        Dim sMsg As String
        Dim bOldOption As Boolean
        Dim rCell As Excel.Range
        Dim sTextToCheck As String
        
        Application.ScreenUpdating = False
       
      'On Error Resume Next
      With Sheets("HP")
           Worksheets("HP").Activate
           Set MyRangeSpell = ActiveSheet.Range(Cells(28, 28), Cells((Range("B28:B28").End(xlDown).Row), (Range("B28:B28").End(xlToRight).Column)).Address)
        MyRangeSpell.CheckSpelling
     End With
    
    With Sheets("D")
         Worksheets("D").Activate
         Set MyRangeSpell = ActiveSheet.Range(Cells(59, 59), Cells((Range("A59:A59").End(xlDown).Row), (Range("A59:A59").End(xlToRight).Column)).Address)
    MyRangeSpell.CheckSpelling
    End With
    
    End Sub
    Last edited by alansidman; 12-09-2016 at 01:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Spellcheck Warning Lines
    By zanshin777 in forum Word Formatting & General
    Replies: 8
    Last Post: 02-12-2015, 07:01 PM
  2. Use VBA to Spellcheck several cells only
    By Dave21 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-11-2014, 07:42 AM
  3. [SOLVED] spellcheck all embedded oleobjects
    By Willardio in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 01:44 PM
  4. MS words spellcheck
    By Webtekr in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2009, 07:31 AM
  5. Excel 2007 : Spellcheck
    By jonnygrim in forum Excel General
    Replies: 2
    Last Post: 07-23-2008, 05:48 PM
  6. Spellcheck Macro Help
    By Kevin Ward in forum Excel General
    Replies: 2
    Last Post: 02-24-2006, 08:14 PM
  7. Spellcheck
    By zt in forum Excel General
    Replies: 3
    Last Post: 07-08-2005, 05:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1