Consulting

Results 1 to 3 of 3

Thread: Solved: Best way to go about?

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    47
    Location

    Solved: Best way to go about?

    Hi, I am new to VBA for Excel. I need to create a custom VBA application that runs in Excel. I will be having a lot of separate data files (workbooks), though only one will be loaded at a time in Excel.

    The VBA application would customize the toolbars and the Ribbon, till the time the application is removed or Excel is quit.

    My question is, where do I keep my VBA code? I don't want the code being replicated in every workbook since it is a waste of disk space. Also if I make a change to the code, it should get reflected for all workbooks that use the application.

    I have read something about add-ins, but I am not sure if that's the way to go. In my current template workbook, I have VBA procedures under ThisWorkbook, Sheet1, etc to handle events associated with them. Now if I have the code sitting somewhere other than these locations, will I still be able to handle those events for the actual workbook I will be working with?

    Thanks for any suggestions.

    Shankar

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Add-ins are the way to go.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Hi, welcome to the board!

    Definitely add-in. As to your events question, it depends what events and their scope that you're wanting to capture. You can use a class module to trap events for any workbook. You can do what you're asking in an add-in though, yes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •