command button position

G

Gerry

How can I get command button to remain visible on the screen as excel page
scrolls
 
F

FSt1

hi
a suggestion.
put the button on a small modaless form. the modaless mode will allow you to
click the sheet, toolbar, scroll, etc but the form will stay stationary. bit
of a hassel maybe but workable.
myform.show 0
1 is modal/default(user cannot do any of the above.click on form only)
0 is modaless

regards
FSt1
 
S

ShaneDevenshire

Sorry if this posts twice, crashed while sending...

You might consider just adding a button to a toolbar, a built-in one or a
custom one. Its easy to set up, it doesn't get in the way as a form might,
its always visible without requiring freeze panes and its really just a
command button.
 
A

Andrew

3 ways-
1) Freeze panes - Mudraker
2) Create Modeless userform.. - Fst1
3) Create a toolbar :-

Sub RemoveCB()
On Error GoTo EndThis
CommandBars("Tbname").Delete ' Make sure bar does not
exist first..! if so remove
EndThis: End Sub

Sub AddToolBar()
Set MyBar = CommandBars.Add("Tbname", msoBarFloating, False,
True)
With MyBar
.Visible = True
.Protection = msoBarNoChangeVisible + msoBarNoResize +
msoBarNoChangeDock
With .Controls.Add '
.Caption = " What this button does"
.FaceId = 172
.Style = msoButtonIconAndCaption
.TooltipText = "What this button does"
.OnAction = "Button_macro"
.SetFocus
' Bar Autosizes to Control Height *** Min Height =22
.BeginGroup = True
End With
End with
End Sub

Then your Commandbar created in OnSheet activete event.. or
similar

Hope that helps
A.

| How can I get command button to remain visible on the
screen as excel page
| scrolls
| --
| Many Thanks
 
Top