+ Reply to Thread
Results 1 to 3 of 3

looking for selected rows or cells

  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    looking for selected rows or cells

    Hi everyone, I'm trying to find a way of finding selected cell or rows in my vb2008 code, I can loop through and read all the cells using my code, but I can't seem to find out if it's selected or not. The senario is, I want to go down the sheet manually and holding the CTRL key down click on each cell of interest, highlighting it, then using my VB code work out which cell was highlighted and store it's location in an array something like :-


    for x = 1 to xlapp.rowcount
    if xlapp.range(x) = selected then ......
    next x

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: looking for selected rows or cells

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Morden,England
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: looking for selected rows or cells

    Many thanks patel45, it works a dream

+ 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