ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to keep the button visible always in the screen, thanks (https://www.excelbanter.com/excel-programming/293383-how-keep-button-visible-always-screen-thanks.html)

Kortrijker

how to keep the button visible always in the screen, thanks
 
Dear all,

Is there any way to keep a button, which is created in excel sheet , always
visible in the screen.

for instance, I create a button directly from toolbar/form/button in excel
sheet, I want to keep this button always stays in the fixed position
whereever I scroll this sheet. Can I realize it or it's impossible.

Thanks
JIANG



Max

how to keep the button visible always in the screen, thanks
 
One way: Put the button within cell A1 and freeze panes at cell B2

For example:

Click on B2, then click Window Freeze Panes

Widen col A & row1 large enough to accommodate the button within cell A1

Place the button within cell A1

It'll always stay in view whether you scroll down / to the right
--
Rgds
Max
xl 97
--
Please respond, in newsgroup
xdemechanik <atyahoo<dotcom
---
"Kortrijker" wrote in message
...
Dear all,

Is there any way to keep a button, which is created in excel sheet ,

always
visible in the screen.

for instance, I create a button directly from toolbar/form/button in excel
sheet, I want to keep this button always stays in the fixed position
whereever I scroll this sheet. Can I realize it or it's impossible.

Thanks
JIANG





Harald Staff

how to keep the button visible always in the screen, thanks
 
Hi Jiang

Put it on a floating toolbar. See if this code get you started:

Sub MakeIt()
Call PromptMessage("Hi Jiang!")
End Sub
Sub PromptMessage(msgText As String)
Call KillIt
Application.CommandBars.Add(Name:="Messenger").Vis ible = True
Application.CommandBars("Messenger").Controls.Add _
Type:=msoControlButton
Application.CommandBars("Messenger").Top = 150
Application.CommandBars("Messenger").Left = 150
With Application.CommandBars("Messenger").Controls(1)
.Caption = msgText
.Style = msoButtonIconAndCaption
.FaceId = 608
.OnAction = ThisWorkbook.Name & "!KillIt"
End With
End Sub

Sub KillIt()
On Error Resume Next
Application.CommandBars("Messenger").Delete
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Kortrijker" skrev i melding
...
Dear all,

Is there any way to keep a button, which is created in excel sheet ,

always
visible in the screen.

for instance, I create a button directly from toolbar/form/button in excel
sheet, I want to keep this button always stays in the fixed position
whereever I scroll this sheet. Can I realize it or it's impossible.

Thanks
JIANG





Bob Phillips[_6_]

how to keep the button visible always in the screen, thanks
 
Jiang,

You could put the button at the top of the worksheet, and freeze below this
button (WindowFreeze Panes), or you could add the button to a toolbar.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Kortrijker" wrote in message
...
Dear all,

Is there any way to keep a button, which is created in excel sheet ,

always
visible in the screen.

for instance, I create a button directly from toolbar/form/button in excel
sheet, I want to keep this button always stays in the fixed position
whereever I scroll this sheet. Can I realize it or it's impossible.

Thanks
JIANG





Kortrijker

how to keep the button visible always in the screen, thanks
 
Dear Max,
Dear Harald,
Dear Bob,

Thanks for your prompt reply. I think I could make it now.

best wishes
jiang



Max

how to keep the button visible always in the screen, thanks
 
You're welcome, Jiang !
Thanks for the feedback.
--
Rgds
Max
xl 97
--
Please respond, in newsgroup
xdemechanik <atyahoo<dotcom
---
"Kortrijker" wrote in message
...
Dear Max,
Dear Harald,
Dear Bob,

Thanks for your prompt reply. I think I could make it now.

best wishes
jiang






All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com