I have an Excel file (MNX Report Gen.xlsm) with VBA code that I use to open a second Excel file (usually Tickets.xls) and manipulate all the data. Is it possible to use MNX Report Gen.xlsm to write VBA code into the Tickets.xls file? If so, what's the code?
Write VBA code with VBA code.
-
-
-
Re: Write VBA code with VBA code.
This link will be your best .... IMO resource and he lists other resources as well. But he is/was a regular contributor here!
-
Re: Write VBA code with VBA code.
On second thought. Why not just create a "BASIC" Tickets.xls file ( minus the data sheets ) but contains the code.
This way.. You just open the workbook .. copy the data over and resave it.
-
Re: Write VBA code with VBA code.
Thanks! I'll check the link and get started. I don't believe the "BASIC" Tickets.xls idea will work. The Tickets.xls file is generated from another program. But thanks for the idea.
-
-
-
Re: Write VBA code with VBA code.
Quote from BrianGG;703590Thanks! I'll check the link and get started. I don't believe the "BASIC" Tickets.xls idea will work. The Tickets.xls file is generated from another program. But thanks for the idea.
I have a similar process here at my work.
I have what I call "template" files, these contain all the code, they then get the data from another generated file (read your Tickets.xls file), pulls it all into the template, runs a bunch of code on it and then spits out what I need (including sending emails and all sort of different outcomes).
I dont think there is a need to write code directly into the Tickets.xls? For example, you can even run the code stored in your master file on the Tickets.xls file by using with blocks etc.
-
Re: Write VBA code with VBA code.
Thanks iwrk4dedpr, the link you provided is what I needed.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!