473,425 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

CommandBar

553 512MB
Hi

I have problem using .OnAction property of
Expand|Select|Wrap|Line Numbers
  1. Set myCPBtn = myCPup1.Controls.Add(Type:=msoControlButton)
  2.     With myCPBtn
  3.            .OnAction = "mySub"
  4.    End With
  5.  
Expand|Select|Wrap|Line Numbers
  1. Public Sub mySub()
  2.     MsgBox ("Hello!")
  3. End Sub
  4.  
I get error:
Microsoft can't run macro or callback function "mySub"


2- How can i make command bar unmoveable ?

Thanks
Qi
Aug 23 '07 #1
1 1822
zaidlig
45
Create a macro named "MySub"
Jan 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Eric | last post by:
I have the following function which creates buttons on Excel commandbar. The problem i can't get the buttons to hook up to events. For example, if i create four buttons only the fourth one fires...
0
by: Ravindran Pandian | last post by:
I have to add a "ATEStudio" popup menu in the VS IDE Menu Bar as below and the menu item "New Test Program" is having submenus like ( Csharp,VisualBasic,ManagedC++). ATEStudio >>NewTestProgram...
3
by: adrian.chandler | last post by:
I have a form with a subform. The subform occupies about the bottom two thirds of the screen. The form has a custom CommandBar docked at the top. The subform also has its own CommandBar. I want...
1
by: cybertof | last post by:
Hello, Could you please tell me what's wrong with this code (c# office code behind) : protected void ThisWorkbook_Open() { try {
2
by: Samuel | last post by:
Hi I want to customize our IDE. I developed some Add-ins and would like to create command bar to access them directly. I'm not sure if the term of "command bar" is appropriat. I mean with it a...
0
by: anonymous | last post by:
Hello, I have a small problem with a VBA commandbar I'm using in Word 2003. I created the toolbar -which works fine - and added some controls like : TBar.Controls.Add(Type:=msoControlEdit) ...
0
by: nithya176 | last post by:
Hey guys..i jus thought if u cud help me out wit this error im gettin. Im writing a c# code to create an add-in in visio using VSTO. I found this code which was in VB and i'm tryin to convert it to...
1
by: Keith L | last post by:
Hi, I am aware on how to retrieve the commandbars collection from the current db (see example), but does anyone know how to do this from a remote Access db? I tried a few variations, namely using...
2
by: bobjones122 | last post by:
I'm building a custom right click using VBA for Word. I am not able to make the TooltipText appear. Is there anything I am missing in the code below?: Set myCommandBar= CommandBars.Add("name1",_...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.