Which cell did I click?

  • Thread starter Thread starter Ian Bayly
  • Start date Start date
I

Ian Bayly

Very basic question because I don't know much excel code. The question seems
too basic even for the help file!
I have a VB project where I create a spreadsheet and populate 8 columns and
approx 100 rows.
I want to click on any row in column 1 and then get the value of column 8 in
the same row.
Column 1 is a location name, column 8 is a pointer to an rtf file and I
wish to click on the name and open the rtf file in word.
I have no problem with handling the rtf file I just don't know how to return
the location of the cell which I click.

TIA

Ian B
 
I think the following did it for me!
Still welcome any more robust way of doing same.

Dim myRange As Range
Worksheets("Sheet1").Activate
Set myRange = Selection
MsgBox myRange.Address

Tks
 
Not sure how that helps unless you are going to parse the row out of it, but

cells(selection(1).row,8).Value

would return the value in the 8th column in the first row of the selection.
 
Back
Top