BusinessObjects Board

Macro/Add-Ins/VBA

As you can probably guess I am very new to BO, I have written a decent VBA macro to perform some repetetive tasks and this works well.

What I want to do is turn this into an add-in that can be easily added by other ‘non-technical’ users to whatever report they are working on and be easily run by these users (i.e. without having to go into the VB Editor and pressing RUN.)

Is this possible and how do I do?

Thanks,

Matt.


LAWSONIUM (BOB member since 2004-03-15)

There are three options for triggering a macro (whether from a document or add-in):

  1. An event (like Before_Refresh, etc). Not sure if this will work for you, since it sounded like the user needed to trigger it themselves.

  2. Attach it to the VB toolbar. One-time on the workstation go to Tools, Options, Macros and associate the macro with one of the buttons (1 - 5). Turn on the VB toolbar, and the user can click the appropriate button.

  3. Create your own custom toolbar and/or menu choice. Search here on BOB for “VBA toolbar” or “VBA menu” or “custom toolbar” or similar (without quotes) and you’ll find many references. There are also samples in BOB’s Downloads that demonstrate this technique.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Hi,

thanks very much, I did find a link quite useful on this site here.

This has started me off nicely, it will be fine for the moment, but I will have to look into using it to place multiple buttons on the toolbar.

Cheers mate.

Matthew


LAWSONIUM (BOB member since 2004-03-15)

With reference to this bit of code:

Application.Clipboard.SetData LoadPicture(ThisDocument.Path & "\Tool.bmp")

Found here

if this controls the icon that is displayed in the toolbar before you click the button, how do I place an Icon on the same button once you have clicked it, currently it just changes to a grey box and returns to the original image once the macro is finished.

Matt.


LAWSONIUM (BOB member since 2004-03-15)