+ Reply to Thread
Results 1 to 4 of 4

Issue with xlspecialcells

Hybrid View

  1. #1
    Registered User
    Join Date
    01-14-2013
    Location
    Columbus
    MS-Off Ver
    excel 2010
    Posts
    9

    Issue with xlspecialcells

    Any idead why the code below isnt executin properly? I took this directly form a VBA book but it isnt working as I had hoped; I get no breaks or runtime errors:

    Sub region()
    On Error Resume Next
    Range("a1").CurrentRegion.SpecialCells(xlCellTypeBlanks).forumular1c1 _
    = "=r[-1]c"
    Range("a1").CurrentRegion.Value = Range("a1").CurrentRegion.Value
    End Sub
    It is supposed to fill in the blank cells below the headings with the heading names.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Issue with xlspecialcells

    You won't see any error message because the On Error Resume Next tells the code to continue if there's an error.

    Try removing it and running the code again.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-14-2013
    Location
    Columbus
    MS-Off Ver
    excel 2010
    Posts
    9

    Re: Issue with xlspecialcells

    HAHA good point.......Okay, I removed it and it breaks at the first line -Object doesnt support object or method.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Issue with xlspecialcells

    You've got a typo - it's FormulaR1C1 not ForumulaR1C1.

+ 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