A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Showing known cell reference in a popup



 
 
Thread Tools Display Modes
  #1  
Old May 31st, 2010, 01:38 AM posted to microsoft.public.excel.worksheet.functions
Colin Hayes
external usenet poster
 
Posts: 313
Default Showing known cell reference in a popup



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.

Ads
  #2  
Old May 31st, 2010, 02:36 AM posted to microsoft.public.excel.worksheet.functions
FSt1
external usenet poster
 
Posts: 2,788
Default Showing known cell reference in a popup

hi
see your other post

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 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.

.

  #3  
Old May 31st, 2010, 03:05 AM posted to microsoft.public.excel.worksheet.functions
Colin Hayes
external usenet poster
 
Posts: 313
Default Showing known cell reference in a popup

In article , FSt1
writes
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.




"Colin Hayes" wrote:



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.

.


  #4  
Old May 31st, 2010, 06:39 AM posted to microsoft.public.excel.worksheet.functions
FSt1
external usenet poster
 
Posts: 2,788
Default Showing known cell reference in a popup

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:

In article , FSt1
writes
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.




"Colin Hayes" wrote:



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.

.


.

  #5  
Old May 31st, 2010, 04:19 PM posted to microsoft.public.excel.worksheet.functions
Colin Hayes
external usenet poster
 
Posts: 313
Default Showing known cell reference in a popup

In article , FSt1
writes
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



Hi FSt1

Yes , that's fixed it.

Perfect - thank you.



Best Wishes


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 OfficeFrustration.
The comments are property of their posters.