Floating Titles

O

Olrjr

Hey, I don't know if this is even possible? But is there anyway that you can
create a floating title to the main cells. EXAMPLE: I am building a spread
sheet (text only) and it contains several names of individuals. The problem
is: when I scroll the sheet so far, the name of the person with whom I'm
working with is no longer visible on the monitor. What I would like to do is
be able to, no matter where I am on the sheet, when the cursor is on that
individual's row there name would appear as something like a hot spot. Is
there anyway to perform this; or is it in the programming of the application?

Thanks
 
M

Max

You could try freeze panes. Eg assuming names are listed in A2 down, select
B2, then click Window > Freeze pane. Now you can scroll to the right and the
names in col A will remain visible.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
 
S

Shane Devenshire

Hi,

Here is some code I put together, you can modify it as need. I am using a
Control Toolbox textbox

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet
.Shapes("TextBox1").Left = .Columns(ActiveCell.Column - 1).Left
.Shapes("TextBox1").Top = .Rows(ActiveCell.Row).Top
End With
Me.TextBox1 = Cells(ActiveCell.Row, 1)
End Sub

You add this code to the sheet object for example Sheet1 , if that's the
sheet you are working with. This code puts the textbox one cell to the left
of the cursor and displays the contents of column A on that row, the users
name.
 
M

Max

.. a tweak to prevent the error msg should the cursor be in col A itself?

Tinkered around, came up with this:
(comments are welcomed on other ways to do it)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column = 1 Then GoTo Err
With ActiveSheet
.Shapes("TextBox1").Left = .Columns(ActiveCell.Column - 1).Left
.Shapes("TextBox1").Top = .Rows(ActiveCell.Row).Top
End With
Me.TextBox1 = Cells(ActiveCell.Row, 1)
Err:
End Sub

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---
 

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