VBA Help. Creating new workbooks from templates and importing content

MrGubbins

New Member
Joined
Feb 21, 2018
Messages
1
Hi all,

So I've started working with VBA a bit and have figured out what I'd like to do and that it is possible, I'm just not skilled enough to be able to write it from scratch.
I've always found it easier for me to work with existing code and learn what everything does by modifying parts of it to do what I need and am hoping that some kind soul will help me get up and moving.

I have created templates for several stages of a process, each with some calculations and everaging etc. specific to that stage, that is all locked and hidden on those templates and am looking to have a main workbook that pre-populates that information and updates it if it is changed on the next stage, allowing me to track updats on a single page, but also simplifying the input.

The tempaltes tend to use information from the other earlier stages to improve the accuracy with each next stage and to save repetition.

This is what i've come up with as far as how it would work:

There is a "MasterWorkbook" that has some information initialy entered to cover the basics (customer name, owner, start/end dates etc.). it also has a "status" field, which should default to "new" when data is entered into the customer name field (I can do this bit easily enough with statements in the work book.
Each row has a button next to it, which when pressed, looks at the "Status" column for that row and determines which templated workbook is needed, or, what workbook it is looking for to extract data from.

I'll run through a sscenario so you get the idea:

If the status is "new" it creates a new workbook, using a template called "Estimator" from a hidden sheet on the main workbook, calling it "esitmator_Customer" where "Customer" is pulled from a column on that row.
When that workbook is created it changes the status to "estimating"

If the button is pressed again, it will read the status as "estimating" and look for that workbook in the same folder as the main workbook is currently in. if it doesn't find it, it generates it again.
If it does find it, it copies the data from that worksheet into the main workbook and changes the status to "estimated"

If the button is pressed and the status is "estimated" it creates a "planner" workbook, using the "planner" template from a hidden sheet on the main workbook, calling it "planner_Customer" and changing the status to "planning"

From then on throughout the rest of that rows lifecycle it repeats this same behaviour, as it steps through the stages, importing informaiton into the main workbook or generating the next document based upon a template and the infromation it already has.

I hope what I'm looking to do makes some sense and if you can point me at any resources or example code that may be of use in my probably over complicated quest, it would be greatly appreciated.


Thanks,

MrG
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,213,484
Messages
6,113,924
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top