• Macro storage location (Excel 2003)

    Author
    Topic
    #420926

    Greetings loungers
    I have a procedure stored in module1 of an excel template.

    A customised toolbar has a button assigned to that routine.

    IT would appear that when I create a new file based on the template the macro assignment to the button becomes filename1.xls!macroName.

    As soon as the button is pointed back to the macro stored in the template all is well. ?

    Storing the routine in the personal workbook is a work around but I only want this routine to be available to files based on the template.

    What am I missing ?

    Regards
    Geof

    Viewing 1 reply thread
    Author
    Replies
    • #954565

      Unlike in Word, there is no link at all between an Excel workbook and the template it was created from. If an Excel template contains VBA code, this code will be copied into each workbook created from the template. So the toolbar button should work if it runs the macro in the new workbook.

      I usually create and delete custom toolbars in code. See the attached example.

    • #954566

      In addition to Hans’ attachment you might want to read thru the thread: Distributing an Excel application with toolbars (5/95/97/2000/2002)

      I think it has some examples and might help you understand what excel is doing.

      Hope this helps,
      Steve

    Viewing 1 reply thread
    Reply To: Macro storage location (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: