Results 1 to 3 of 3

Activate the Selected Cell....

This is a discussion on Activate the Selected Cell.... within the Excel Questions forums, part of the Question Forums category; In column D I have a formula which will result in only one cell returning an error. I have the ...

  1. #1
    New Member
    Join Date
    Jun 2009
    Posts
    18

    Post Activate the Selected Cell....

    In column D I have a formula which will result in only one cell returning an error. I have the following code which is selecting that cell;

    Range("D19:D6588").Select
    Selection.SpecialCells(xlCellTypeFormulas, 16).Select

    I would now like the code to scroll to that cell, but am having trouble achieving this. I tried addind the following;

    Application.Goto Selection = ActiveCell, Scroll:=True

    But of course this doesn't work becuase the cell I want to scroll to is SELECTED not ACTIVATED.

    Can anyone help?
    Last edited by simonjervis; Nov 4th, 2009 at 07:29 AM.

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    64,589

    Default Re: Activate the Selected Cell....

    The GoTo method doesn't have a Selection argument. This worked for me:

    Code:
    Sub Test()
        Range("D19:D6588").Select
        Selection.SpecialCells(xlCellTypeFormulas, 16).Select
        Application.Goto Reference:=ActiveCell, Scroll:=True
    End Sub
    Microsoft MVP - Excel

  3. #3
    New Member
    Join Date
    Jun 2009
    Posts
    18

    Smile Re: Activate the Selected Cell....

    Thank you very much - that works brilliantly.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com