Floating

W

werdna

I have frozen the panes of a sheet already.
The column headings are frozen at the top and the client data to th
left.

[SIDE WITH CLIENT HEADINGS] --- [OTHER HEADINGS]
--------------------------------------------------------------------
[CLIENT DATA - SCROLL DOWN] --- [OTHER DATA - SCROLL DOWN AND ALONG]

Get it?

Well, I have add a few rows above the headings for data I want to sta
there. So, if I place it above the client headings - it stays becaus
that cant be moved. But if I place anything about the other headings
it is lost when you scroll right.

Is there a way for me to add like floating layer thing above the clien
headings - so even though the data can be scrolled, that just floats an
dont move
 
D

Dave Peterson

I put a textbox from the Drawing Toolbar in the frozen area. I used Row 1 and
adjusted the height so that it wouldn't cover any real headers.

Then I used this event macro.

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim TB As TextBox

Set TB = Me.TextBoxes("text box 1")

With Me.Cells(1, ActiveWindow.ScrollColumn)
TB.Top = .Top
TB.Left = .Left
End With

End Sub

The bad news is that it doesn't actually put the textbox in the correct position
until another cell is selected. If you move with the arrow keys, it's ok. But
if you use the scrollbar, it could be one click (on any cell) away from being
ok.

Just rightclick on the worksheet that should have this behavior, select view
code and paste this into the code window.

Make sure you match the name of the textbox from the worksheet in the code. If
you click on the textbox, you can see its name in the namebox (to the left of
the formula bar).


If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you're new to events, David also has notes at:
http://www.mvps.org/dmcritchie/excel/event.htm

Chip Pearson also has some notes about events at:
http://www.cpearson.com/excel/events.htm
I have frozen the panes of a sheet already.
The column headings are frozen at the top and the client data to the
left.

[SIDE WITH CLIENT HEADINGS] --- [OTHER HEADINGS]
--------------------------------------------------------------------
[CLIENT DATA - SCROLL DOWN] --- [OTHER DATA - SCROLL DOWN AND ALONG]

Get it?

Well, I have add a few rows above the headings for data I want to stay
there. So, if I place it above the client headings - it stays because
that cant be moved. But if I place anything about the other headings,
it is lost when you scroll right.

Is there a way for me to add like floating layer thing above the client
headings - so even though the data can be scrolled, that just floats and
dont move?
 

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