Macro help - creating a new workbook

%3CLINGO-SUB%20id%3D%22lingo-sub-2409162%22%20slang%3D%22en-US%22%3EMacro%20help%20-%20creating%20a%20new%20workbook%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2409162%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Excel's%20Macro%20recorder%20and%20I've%20done%20this%20probably%20about%20a%20dozen%20times%2C%20re-recording%20the%20same%20macro%20where%20I%20have%20a%20file%20that%20is%20exported%2C%20and%20then%20basically%20filtered%20and%20shuffled%20to%20create%20two%20files%3A%20one%20for%20online%20data%2C%20the%20other%20for%20on-site%20data.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20run%20the%20macro%2C%20it%20always%20stops%20midway%20through%20and%20says%20'outside%20of%20script'%20-%20so%20how%20do%20I%20create%20a%20macro%20where%20I%20can%20create%20two%20excel%20files%20and%20save%20them%20as%20different%20file%20names%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2409162%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETraining%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

Hello, 

 

I am using Excel's Macro recorder and I've done this probably about a dozen times, re-recording the same macro where I have a file that is exported, and then basically filtered and shuffled to create two files: one for online data, the other for on-site data. 

 

When I run the macro, it always stops midway through and says 'outside of script' - so how do I create a macro where I can create two excel files and save them as different file names? 

0 Replies