Help. How do I place Command Button on a sheet so that it is always
visible in the window and does not go out when the page is scrolled?--
avveerkar
------------------------------------------------------------------------
avveerkar's Profile: www.excelforum.com/member.php...oamp;userid=30338
View this thread: www.excelforum.com/showthread...hreadid=500030Use Windowgt;Freeze Panes to create an area which will always be
visible, then plonk your Button in there.
Rgds,
ScottO
quot;avveerkarquot; gt;
wrote in message
...
|
| Help. How do I place Command Button on a sheet so that it is always
| visible in the window and does not go out when the page is
scrolled?
|
|
| --
| avveerkar
| -------------------------------------------------------------------
-----
| avveerkar's Profile:
www.excelforum.com/member.php...oamp;userid=30338
| View this thread:
www.excelforum.com/showthread...hreadid=500030
|
Avveerkar,
What you need is the macro below. Put it in the sheet module.
No need to freeze panes. When you have scrolled and the original Command
Button is out of sight, another one will appear in the upper left corner of
the visible part of your worksheet when you click on any visible cell.
I got this macro from one of the very helpful people in this NG; I am happy
to pass it on.
HTH
Jack Sons
The Netherlands
---------------------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
If ActiveCell.Column gt; 16 Then
Dim myShape As Shape
Set myShape = Me.Shapes(quot;historiequot;) 'lt;== change the text between quot;quot; into
the name of your Command Button
With Me.Cells(1, ActiveWindow.ScrollColumn)
myShape.Top = 30 '.Top
myShape.Left = .Left
End With
End If
End Sub
-----------------------------------------------------------------------------------
quot;avveerkarquot; gt; schreef
in bericht ...
gt;
gt; Help. How do I place Command Button on a sheet so that it is always
gt; visible in the window and does not go out when the page is scrolled?
gt;
gt;
gt; --
gt; avveerkar
gt; ------------------------------------------------------------------------
gt; avveerkar's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30338
gt; View this thread: www.excelforum.com/showthread...hreadid=500030
gt;
- Mar 13 Thu 2008 20:43
Command Button Always Visible in window
close
全站熱搜
留言列表
發表留言
留言列表

