Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Tom Ogilvy Wrote: There is no event associated with a window Scroll. You could use the selection change event which will work more often than required, but should do the job. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static Oldrange As Range Dim rng As Range, rng1 As Range If Oldrange Is Nothing Then Set Oldrange = ActiveWindow.VisibleRange Exit Sub End If If ActiveWindow.VisibleRange.Address < _ Oldrange.Address Then Set rng = ActiveWindow.VisibleRange Set rng1 = rng(rng.Count).Offset(-2, -2) CommandButton1.Top = rng1.Top CommandButton1.Left = rng1.Left End If right click on the sheet tab and select view code. Put in code like the above in the resulting module. -- Regards, Tom Ogilvy Thanks a million Tom. That should do it. Thanks a lot to Bob also. I am closing this thread now. A V Veerkar -- avveerkar ------------------------------------------------------------------------ avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338 View this thread: http://www.excelforum.com/showthread...hreadid=500050 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command Button Always Visible in window | Excel Discussion (Misc queries) | |||
XL2003: control button not visible | Excel Programming | |||
Visible Button If..... | Excel Programming | |||
Make Command Button visible only in .xlt? | Excel Programming | |||
how to keep the button visible always in the screen, thanks | Excel Programming |