Showing known cell reference in a popup

C

Colin Hayes

HI

I'm trying to show a selected cell reference in a popup , rather than
the cell content.

This is the code :

Dim lrow As Long
With ActiveSheet
lrow = Range("A" & Rows.Count).End(xlUp).Row
End With

Dim r1 As Range, r2 As Range
Set r1 = Application.InputBox(prompt:="Enter address of first cell",
Type:=8)
Set r2 = Application.InputBox("Address of first cell chosen " & r1 &
vbCr & vbCr & "Enter address of
last cell" & vbCr & vbCr & "(Total Rows In Table : " & lrow & ")",
Type:=8)

Range(r1, r2).Select

End Sub

The problem is that this returns the content of the cell chosen in the
first popup (r1) , rather than the cell reference.

Can someone advise how to do this please?

Grateful for any assistance.
 
C

Colin Hayes

FSt1 said:
hi
see your other post

Regards
FSt1

Hi

Thanks for getting back. My first post has an error in it , so I
reposted in this forum. Could you post your reply here please , as I've
deleted my first one and can't see your reply there.

Thanks for your patience...

best wishes.
 
F

FSt1

hi
in your second set, don't reference r1. instead refererce r1.address ie

Set r2 = Application.InputBox("Address of first cell chosen " & r1.Address & _
vbCr & vbCr & "Enter address of last cell" & vbCr & vbCr & _
"(Total Rows In Table : " & lrow & ")", Type:=8)

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top