Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Oct 2002
    Location
    Sheffield, Yorkshire, England
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SheetSelectionChange (Excel 2003)

    I have code that executes on the SheetSelectionChange event. This works fine until I group sheets and then select entire rows. This sends Excel into an infinite loop. Is there any code I could use to trap for when there is a group selection of sheets?

    Graham

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SheetSelectionChange (Excel 2003)

    <pre>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveWindow.SelectedSheets.Count > 1 And _
    Target.Address = Target.EntireRow.Address Then _
    Debug.Print "Trapped"
    End Sub
    </pre>

    HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Star Lounger
    Join Date
    Oct 2002
    Location
    Sheffield, Yorkshire, England
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SheetSelectionChange (Excel 2003)

    Perfect - thanks

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SheetSelectionChange (Excel 2003)

    If you show us the code, we might be able to tell you why it does not work.
    Legare Coleman

Posting Permissions

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