Displaying Name Box Contents

R

Rope

Hi, I have named each cell on a worksheet. When a cell is selected, the name
appears in the "Name Box" as usual. Is there a way I can display the name of
the selected cell on the spread sheet? I do not want the Name Box or the
Formula Bar to be shown on the display to those entering data. Thank you.
rope
 
O

OssieMac

You could use Comments. (Lookup in Help for more info.) However, you need to
hover the cursor over the cell to see the comment or turn on 'Show comments'
which tends to hide other info on the worksheet.
 
A

Amish

As OssieMac mentioned, you could use comments, but the user can turn
them off.
I prefer using a Data Validation Input Message (Data ribbon in 07),
which will display whenever the cell is selected (even if they browse
there with the keyboard).

Protection also might work in your case because users can opt to use
the Tab key to navigate to only unprotected cells.
 
R

Rick Rothstein

You name "each cell on a worksheet"? All 16,777,216 of them?? Really???

If you are hiding the Name Box and Formula Bar (which is what I assume you
meant by your next-to-last sentence), then where on the spread sheet did you
want to "display the name of the selected cell"?
 
P

Patrick Molloy

on the sheet's code page (right click the tab & select View Code) add this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Range("A1") = ""
Range("A1") = Target.Name.Name
End Sub

it gets a range name and places it in cell A1. The error trap is there
because there's an error if the cell hasn't got a range name

the following code places the name in the status bar:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Application.StatusBar = False
Application.StatusBar = Target.Name.Name
End Sub
 

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