Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VBA combo box

Options
  • 24-11-2009 8:04pm
    #1
    Registered Users Posts: 4,037 ✭✭✭


    I have a VBA app that was put together by someone else. There is a combo box in it that when you right-click on it it gives you a command that exports the contents of the combo box to Excel.
    I want to know how do I get at the code which produces this? I presume it is some kind of macro.
    Thank you.


Comments

  • Closed Accounts Posts: 317 ✭✭tiptap


    lukin wrote: »
    I have a VBA app that was put together by someone else. There is a combo box in it that when you right-click on it it gives you a command that exports the contents of the combo box to Excel.
    I want to know how do I get at the code which produces this? I presume it is some kind of macro.
    Thank you.

    Hi

    What version of access is it.
    If it's 2007, if you go into the database, and click on the file, then access options, then customize, you should see somewhere in there that the other developer probably created a custom menu.

    Also, if you do a ctrl and F to do a search. If you search in the entire solution for the name of the dropdown box, you should see the code where he is exporting to excel.

    Cheers


  • Registered Users Posts: 4,037 ✭✭✭lukin


    It is Access 2002.


  • Moderators, Politics Moderators Posts: 39,850 Mod ✭✭✭✭Seth Brundle


    go into the forms design
    right click on the combo and choose properties
    select the events tab
    Select the event handler that corresponds with the export (possibly before update or after update). If it gives the name of somehting in there then it is macro based but if it says "[Event Procedure]" then its code based (which may well be passwrod protected). Clicking the ellipsis should open the code for you.

    Is this a business critical application? If so then make sure that you have backed up the database and also make sure that you know what you are doing (which (with no offence intended) it sounds like you don't). Any code will need to be compiled after you change it.

    Also, bear in mind that if (in the off chance) this was developed by another company for you, do you own the application or is there already a support agreement in place?


  • Registered Users Posts: 4,037 ✭✭✭lukin


    Silly me, I found the code by doing a search for the message box that comes up when you select the menu item ("Are you sure you want to export?").
    I still don't know where it is called from but it doesn't matter.


Advertisement