ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Menu bar question (https://www.excelbanter.com/excel-programming/363082-menu-bar-question.html)

gabch[_37_]

Menu bar question
 

Hi,

How can I add the txt obj into menu bar like attached file?

Thx


+-------------------------------------------------------------------+
|Filename: image002.gif |
|Download: http://www.excelforum.com/attachment.php?postid=4837 |
+-------------------------------------------------------------------+

--
gabch
------------------------------------------------------------------------
gabch's Profile: http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547726


Bob Phillips

Menu bar question
 
With Application.CommandBars("Standard")
With .Controls.Add(Type:=msoControlEdit, temporary:=True)
.Caption = "myBox"
.OnAction = "myBoxMacro"
End With
End With

End Sub

Sub myBoxMacro()
With Application.CommandBars.ActionControl
MsgBox .Text
End With
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"gabch" wrote in
message ...

Hi,

How can I add the txt obj into menu bar like attached file?

Thx


+-------------------------------------------------------------------+
|Filename: image002.gif |
|Download: http://www.excelforum.com/attachment.php?postid=4837 |
+-------------------------------------------------------------------+

--
gabch
------------------------------------------------------------------------
gabch's Profile:

http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547726





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

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