get ActiveCell.Address when a chart is selected

  • Thread starter Thread starter Brian Murphy
  • Start date Start date
B

Brian Murphy

Is it possible to get ActiveCell.Address while a chart on a worksheet
is selected?

Thanks,

Brian
 
A couple of window properties will get it -

For Each wn In ActiveWorkbook.Windows
If Not wn.ActiveCell Is Nothing Then
Set acell = wn.ActiveCell
MsgBox acell.Address & vbCr & _
wn.RangeSelection.Address
Exit For
End If
Next

Obviously if you know an embedded chart item is selected simply
ActiveWorkbook.Windows(2).ActiveCell

But don't do that in 2007, earlier versions only

Regards,
Peter T
 
Back
Top