none
Using a VBA project as a Template RRS feed

  • Question

  • Hi, I work in a company where we use a new program called SolidWorks Inspection that takes an Excel Template and a Drawing then creates an Inspection report on an Excel spread sheet. I wrote a VBA code that will extract information from the user and input them in their places on the spread sheet. I made this VBA code on the Template and saved it. Solidworks Inspection exports the information into that template creating a spread sheet. i saved my work then opened it back up to run the VBA project but it is not there anymore only the Button that i made to run the program is there but the actual Modual disappeared. The question here is can I write a VBA code that can be saved as a template so that whenever i use it on anything my code will be ready to go with a click on a button?
    Monday, January 19, 2015 8:07 PM

Answers

  • Hi

    When you save your work, you must save it with the extension "xltm".

    If you don't, you lose the macro.


    Cimjet

    Tuesday, January 20, 2015 12:19 AM

All replies

  • When the corporation I work for, changed all PCs to Win7 Pro x64 & office 2010, I had macros disappear after creating new code in personal.xlsb (local VBA project file).   Maybe a ' trusted document' and or 'Trusted Location' (network folder?) issue

    Your IT  department may need change their standard Policy for all users, to allow saving code to a 'trusted location'.

    Mark

    Monday, January 19, 2015 8:32 PM
  • Hi

    When you save your work, you must save it with the extension "xltm".

    If you don't, you lose the macro.


    Cimjet

    Tuesday, January 20, 2015 12:19 AM