Solved

Linking info into Excel worksheet from an Excel Template

Posted on 2012-03-14
4
257 Views
Last Modified: 2012-03-16
I have a template that someone will be entering data into and saving/renaming it to a workbook.  Then a different person will open up another workbook that I want to link some of the cells from the first workbook to the new workbook.  Since employee 1 will rename the workbook, how do I easily update the link in workbook?  The first template will be used over and over and saved a new name each time.  What I don't get is how to update the new workbook link each time.  The cells will remain the same however.  This needs to be relatively simple since the user(s) are not computer savvy.  The first employee will notify the second employee the name of the new workbook name.  What would be great is if there was a way for the second employee to type the name of the first workbook in a cell and voila...the links would update.
0
Comment
Question by:ITworks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
dlmille earned 500 total points
ID: 37727530
I thought long and hard about what you described and seems like too many moving parts to manage, IMHO.

However, It MIGHT be easier to have a macro save the particular range you're interested in sharing to another workbook then have all the templates initially look at THAT workbook (you can initially set that file up, manually.  No need for updating links and a macro would open THAT workbook, replace the range and save it.

So, in the template a button could be used to "Load" that range, then another button (or BeforeClose macro) could update that range in THAT workbook.

Alternatively, the workbook_open event could fire in  the newly created file from template and could check for a particular filename in a particular path and if it exists, it sets the links to that path\file.  That way when someone saves their file to that path\file, the next open by others would point to the right file.


FINALLY, the last alternative is to have a button to prompt the user for the path\filename of the workbook it needs to link to, then have the VBA code update all links from where they currently are to that revised path\filename.  This might be the ticket and seems fairly straightforward.

What do you think of these approaches?  Let me know which one you find appealing and post a dummy template I can work with and I can sort it for you.

Dave
0
 
LVL 4

Author Comment

by:ITworks
ID: 37729633
I like the last option.....button to prompt the user for the path\filename of the workbook it needs to link to.

I don't have these templates created yet.  I was just thinking outloud how to do it before I created them.  I wouldn't know the VBA code for this and would need help with that.

Thanks, Dave
0
 
LVL 4

Author Closing Comment

by:ITworks
ID: 37730626
I'll probably have to post this again once I start working on these Excel spreadsheets so you can see the actual files and data I'm working with.

Thanks so much for your insight, Dave, and I hope you keep an eye out for that post in the next few weeks. :-)
0
 
LVL 42

Expert Comment

by:dlmille
ID: 37730723
Great.  Be sure to post here with the link to your next related post.  I'll be teed up at that point.

Dave
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question