BusinessObjects Board

Calling all VBA Programmer Experts - HELP

There are 8 events that can be used within VBA such as Document_Open , Document_BeforeRefresh etc , but there is not one for Edit Data Provider. What I have done is customise my own , by creating a new command bar, and deleting the Edit Data Provider from the Standard toolbar. I was hoping that I could amend the OnAction of the Edit Data Provider (item 24 in the list of commands)but I cant as this is BuiltIn. I was then hoping I would be able to the syntax to Execute item 24 but of course i have deleted it and the list of commands change. I need an event to occur when a person clicks on the Edit Data Provider button rather than me having to re-write my own command bar. Now for the questions… (1) Can I HIDE the Edit Data provider button rather than delete it. (2) If I have to delete it can I fire it up in the VBA , so that the List of Data Providers pops up (3) Is there a command with VBA to fire up the list of data providers…

Having answers to one or more of the questions should be mor than adequate for me to continue with my VBA code…

And if interested i have managed to create an audit trail on Deski of what our users are querying against our databases. The Edit Data Provider is my last hurdle.

many thanks

Macroman


Macroman :uk: (BOB member since 2002-11-13)

Let’s see. After deleting the button, just add your own back in the same spot. Use the same FaceId (icon) and it will look exactly the same. I don’t think there is a built-in way to list the data providers, but a simple userform could be used … similar to the code in this utility.


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

Is FaceId part of a VBA command parameter in that I can extract an icon image from a BuiltIn button and paste the image onto my newly created custom button?


Macroman :uk: (BOB member since 2002-11-13)

chk = Application.CmdBars(“Standard”).Controls(24).FaceId

Set newbutt = Application.CmdBars(“Standard”).Controls.Add(boControlButton)
newbutt.FaceId = chk
newbutt.Caption = “Hello”
newbutt.OnAction = “sayHello”

I would still like to be able to hide Controls(24) instead of delete it, and then fire up Controls(24).execute option but once it is deleted the BuiltIn menuoption change order.

Ooooooh yeah it is , many thanks

Macroman


Macroman :uk: (BOB member since 2002-11-13)