+ Reply to Thread
Results 1 to 3 of 3

CheckSpelling method won't spellcheck one cell

  1. #1
    Registered User
    Join Date
    05-08-2005
    Posts
    3

    CheckSpelling method won't spellcheck one cell

    I'm new to this, but working on a VBA/Excel macro that has a button on a userform to spellcheck on a single cell. This is supposed to be a cross-platform excel macro (Mac- Excel v.X/PC 2001/2003). I'm developing on a Mac, and this line works fine on the mac:

    ActiveCell.Offset(0, 5).CheckSpelling

    but doesn't on the PC side of things. It continues to spellcheck the cells in the entire worksheet.

    I've seen a suggestion along the lines of

    Range("F2"[, "F2"]).CheckSpelling

    So, since I'm not sure of the actual Cell Reference during execution, how can I "translate" the "ActiveCell.Offset(0, 5)" into an equivalent that will work in the second example that uses "Range(....).CheckSpelling.

    Or if anyone has any suggestions other than the above, I'll try those.

    Btw, in the VBA/Excel environment does MS fix stuff things like this, when the command works on one platform and not on the other?

    Thanks
    Last edited by TomOlson; 05-08-2005 at 10:14 PM. Reason: forgot some info

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    If you can identify a cell that absolutely will not be impacted by the spell checker (like a blank cell), you could try this:

    If cell A1 is blank . . . .
    Application.Union([A1],ActiveCell.Offset(0, 5)).CheckSpelling

    That way the range to be checked contains more that one cell. Consequently, the spell checker won't check the whole sheet.

    Does that help?

    Ron

  3. #3
    Registered User
    Join Date
    05-08-2005
    Posts
    3
    Ron, thanks for your response:

    I ended up doing this:

    b=ActiveCell.Offset(0,5).Address
    Range(b,"F1").CheckSpelling

    where "F1" is header cell that should always be spelled correctly.
    But the combined use of the "Address" method(courtesy of another entry I read) and your suggestion, did the trick.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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