Copy links from one spreadsheet to the other

S

Shawn777

I have two questions for the same macro

I have a master “Jobsite†spreadsheet that holds jobsite information and the
macros that are needed to automate the project. This Jobsite spreadsheet
opens an estimating template and populates it with a selected jobsite data.
The two tabs below "SUMMARY METRICS", "DETAIL & UNIT METRICS†are the tabs
that populate the estimating template.

1) First question. The following code copies these sheets to the new
template

Sheets(Array("SUMMARY METRICS", "DETAIL & UNIT METRICS")).Copy Before:= _
Workbooks("Estimating Template Master.xls").Sheets(9)

This all works, but a pop-up message occurs asking if I wish to use the
names on the template, which I do. The message sound something like the
following

A formula you copy contains the name ***, which already exists on the
destination worksheet. Do you want to use this version of the name?

And asks Yes or No – I want it to always be yes and my question is how do I
put this into the above code?

2) Second question. This macro also renames the estimating template to the
project’s name. As it does this the above “SUMMARY METRICS", "DETAIL & UNIT
METRICS" tabs on the Jobsite master get assigned to the new estimating
template name. How do I stop this from happening? I need the link to stay
attached to the "Estimating Template Master.xls" and not what that sheet is
being renamed to. Since these tabs reside in the Jobsite master and copied
to the estimating template and the macros are on this Jobsite master (so I
can’t close it) as the estimating template changes names I need the link to
stay attached to the "Estimating Template Master.xls" and not what it is to
be renamed as.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top