Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Button on a sheet always visible


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button Always Visible in window avveerkar Excel Discussion (Misc queries) 2 January 11th 06 12:21 PM
XL2003: control button not visible Holger Osterbuhr[_2_] Excel Programming 1 November 8th 05 02:57 PM
Visible Button If..... Wayne Excel Programming 1 July 21st 04 08:48 AM
Make Command Button visible only in .xlt? RPIJG[_23_] Excel Programming 2 May 17th 04 07:14 PM
how to keep the button visible always in the screen, thanks Kortrijker Excel Programming 5 March 4th 04 10:54 AM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"