+ Reply to Thread
Results 1 to 3 of 3

beginner problem: getting selected rows, row by row

  1. #1
    Holger Beese
    Guest

    beginner problem: getting selected rows, row by row

    Hi,

    How can I see, if a row is selectet??? *grmpf*
    ActiveWindow.RangeSelection.Address gives me all the selected cells.
    This doesn't help me much. I need somthing like this:

    ....
    if [any special row].selected then
    ...[do my work with this special selected row]
    endif
    ....

    But the attribut selected seems not to exist. How can I get the
    information, if a row ist selected or not?

    THX,

    H. Beese


  2. #2
    DPZ_Online
    Guest

    Re: beginner problem: getting selected rows, row by row

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    End Sub

    This function is found in the VBA editor when you doubleclick on a
    sheet, ant then go to the right dropdownbox and chose SelectionChange


    In this one you can have a check...

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim sRow, sCol as String

    sRow = Target.Row
    sCol = Target.Column

    Then you can work with the string "sRow" to find out if it is 1 2 or 3

    End Sub


  3. #3
    Holger Beese
    Guest

    Re: beginner problem: getting selected rows, row by row

    Looks good, but does it work also, if there are selected more then one
    row? If the user select more then one row, it have to do the work with
    every row by itself.

    Holger

    DPZ_Online schrieb:

    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >
    > End Sub
    >
    > This function is found in the VBA editor when you doubleclick on a
    > sheet, ant then go to the right dropdownbox and chose SelectionChange
    >
    >
    > In this one you can have a check...
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Dim sRow, sCol as String
    >
    > sRow = Target.Row
    > sCol = Target.Column
    >
    > Then you can work with the string "sRow" to find out if it is 1 2 or 3
    >
    > End Sub
    >



+ 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