How do I add a custom actions dropdown for my custom VBA Script - vba

I am trying to add a custom actions button for my custom VBA Script similar to how we have options underneath almost every button press in Outlook/Excel/Word etc. Is there a way I could achieve this? Please refer to the picture.

You want to create a custom menu item. I can't say I have tried this myself, but I think this is what you need: http://msdn.microsoft.com/en-us/library/office/gg508923(v=office.15).aspx

Related

Show Button only in edit mode odoo

I have added a button to existing form of purchase order in Purchase order Line Tree. But i want to show that button only in edit mode. I tried:
<button name="adjust_received_qty" string="⇒ Adjust" type="object" class="oe_edit_only"/>
i tried to put class = oe_read_only, but it does not work in odoo 8.
Thanks,
UPDATE
My requirement is : i want to show the button when user clicks edit button. if i use the suggested approach, i will able to hide button in create view.but it will be visible in form view even in view mode. I want to show the button only in edit view ( when user clicks the edit button )
Please Help,
try class=oe_edit_only
it's working fine for me
Standard Odoo work must be using python+xml in general, and it's not recommended to use javascript long codes with it because it may cause performance problems.
I've not done this but I think you can achieve this using javascript and add on click event listener on edit button and use show()-hide() function on the fields/button which you want to hide/show so it may help you to solve this issue.
Maybe digging in deep odoo codes may give you another solutions who knows :D

VBA: Events for several dynamically added buttons

I am adding several CommandButtons dynamically to my user form. To assign code, I used the answer of this question: Assign code to a button created dynamically
However, I need to determine which button has been clicked. They all do have different names. Therefore, my initial idea was to get the name of the clicked button in the CmdEvents_Click() procedure. However, I have not found a solution how to do that.
Does anyone have a solution how to trigger button specific events?
Add the Name of the new command e.g. like ctl_Command.Name = "name_" & i
Then in the CmdEvents_Click just use CmdEvents.Name.

Add global button in CRM

Is there a way to add a new button to ALL PAGES in CRM?
I have tried different ways but in some views, the new button is shown at the end. Im trying to found a way to create a button and place it as first button, to any view, entity and page in CRM. Is this accomplisable?
I'm afraid that out-of-the-box buttons will often take precedence over custom buttons, and the only way to change that would be to hide the out-of-the-box buttons.
I'm assuming you are adding the button via the Application Ribbon, correct? (not every single form and grid)
You can add items to the "Jewel", (the dropdown from "File" in the top left). It's not exactly the same as putting it in the ribbon because you have to make an extra click, but it should show up globally.

How can you add an image to a listbox in VB?

I am wanting to add an image to the top or background of a listbox. I would like it to be visible on the screen, but more importantly is that it prints. Can someone help me with the code for this. I tried to see if you could add it through properties and don't see that option. I need the listbox not listview. Also I was wondering if it could be added as a string and the file referenced at the top of the listbox (when you right click the little arrow and click edit options? Can someone please help. I am working on a project and still very new at this.
You need to create a custom ListBox class and add the ability to draw a custom background by overriding the OnPaint event, like on:
Source: http://www.vbforums.com/showthread.php?416784-2005-ListBox-Background-Image

jqgrid radio button

I was trying to define a jqgrid column as a radio button group, but I could not.
Anybody knows what I have to do? Please give me an example.
You can do this if you define custom formatter and custom unformatter. If you will need to edit the cells/rows with radio buttons you will have to implement also custom editing. You can do implemant all this, but I would not recommend to do this. I recommend you to conside to use select formatter instead and use it together with stype:'select'. Radio button group shows mostly the same information, but in more compact form. If you do need to use radio button then I would you recommend you to use there only during cell/row editing.