Dim rng As Excel.Range
'convert selection to range object
rng = CType(Globals.ThisAddIn.Application.Selection, Excel.Range)
If Not rng Is Nothing Then
'show selection address
If rng.Count > 1 Then
'if there are more than one cell selected, only show value of the first cell
In addition, I'm going to change type of this thread to a question.