Prev: How 2 sort an autosum total list after adding items 2 autosum item
Next: How to clear up useless content within worksheet?
From: Colin Hayes on 30 May 2010 18:49 HI I'm trying to show a selected cell reference in a popup , rather than the cell content. This is my 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 In the second popup , I want to show the reference of the cell that was chosen in the first popup. Instead , it shows the content of the chosen cell. Can someone advise how to do this please? Grateful for any assistance. Are you aware that we also buy CDs, Vinyl and DVDs? Send your lists of unwanted items to Colin(a)chayes.demon.co.uk and we'll quote you a price… You can browse and buy direct from my full list of items at these addresses : http://s1.amazon.co.uk/exec/varzea/ts/my-zshop/SPJK3X6KOJZR6/026-3393902-9 050050 or: http://www.CDandVinyl.co.uk or : http://www.netsoundsmusic.com/cdandvinyl or: http://chayes.musicstack.com To DOWNLOAD the full catalogue click here : http://www.chayes.demon.co.uk/CDandVinyl_full_catalogue.exe Best Wishes , Colin Hayes. TEL / FAX : (UK) (0)208 804 9181
From: FSt1 on 30 May 2010 21:07
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 "Colin Hayes" wrote: > > HI > > I'm trying to show a selected cell reference in a popup , rather than > the cell content. > > This is my 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 > > > In the second popup , I want to show the reference of the cell that was > chosen in the first popup. Instead , it shows the content of the chosen > cell. > > Can someone advise how to do this please? > > Grateful for any assistance. > > > Are you aware that we also buy CDs, Vinyl and DVDs? Send your lists of > unwanted items to Colin(a)chayes.demon.co.uk and we'll quote you a price… > > > You can browse and buy direct from my full list of items at these addresses : > > http://s1.amazon.co.uk/exec/varzea/ts/my-zshop/SPJK3X6KOJZR6/026-3393902-9 > 050050 > > or: > > http://www.CDandVinyl.co.uk > > or : > > http://www.netsoundsmusic.com/cdandvinyl > > or: > > http://chayes.musicstack.com > > > > To DOWNLOAD the full catalogue click here : > > > http://www.chayes.demon.co.uk/CDandVinyl_full_catalogue.exe > > > > Best Wishes , > > Colin Hayes. > > > > TEL / FAX : (UK) (0)208 804 9181 > . > |