form follows user's activity on sheet and updates itself

O

okey

(repost - I think this one belongs here)

I have a huge ss and need to work with all of it. There are certain
cells in each long row that I'd like to see at all times.

I have a "viewer" connected to a hot keyed macro that does just that.
The form also allows editing of those cells.

Is is possible that the form can be made to follow me while I work on
the ss? If I move to row X, the form senses that and gets the data
from that row. I could install some goto controls on the form, but I
rather the form follow my activities while I work on the ss.

And I want the form. It has tools that help display and edit complex
strings. Just moving the cells to a central area on the ss is not
what I want..

Thank you.
 
S

Simon Lloyd

Can said:
(repost - I think this one belongs here

I have a huge ss and need to work with all of it. There are certai
cells in each long row that I'd like to see at all times

I have a "viewer" connected to a hot keyed macro that does just that
The form also allows editing of those cells

Is is possible that the form can be made to follow me while I work o
the ss? If I move to row X, the form senses that and gets the dat
from that row. I could install some goto controls on the form, but
rather the form follow my activities while I work on the ss

And I want the form. It has tools that help display and edit comple
strings. Just moving the cells to a central area on the ss is no
what I want.

Thank you

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 
P

Patrick Molloy

with the form modeless, you can navigate around the workbook
in the dorm, you can declare public subs that you can interface with from
other VBA code and these subs (procedures) can populate the viewer

so lets say in the form you have
Sub SheetChanged(sh as worksheet)
SelectionChanged sh.Selection
End Sub
Sub SelectionChanged(target as range)
'some code here
End Sub

now in the code page for ThisWorkbook you can trap sheet change and pass it
to the form.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
frmViewer.SheetChaneg sh
End Sub

you can do a similar thing with selection changes, but using ThisWorkbook's
event and not the individual sheets' events

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
With frmViewer
.SheetChanged sh
.SelectionChanged Target
End With
End Sub
 
O

okey

Sub SheetChanged(sh as worksheet)
    SelectionChanged sh.Selection
End Sub
Sub SelectionChanged(target as range)
'some  code here
End Sub

Ahhh! A whole new world. Thanks. Exactly what I wanted.
 

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