?
Solved

Excel VBA combine two working workbooks

Posted on 2016-09-09
8
Medium Priority
?
85 Views
Last Modified: 2016-09-11
HI Expert,
I have 2 workbooks
1). The first one  is a drop-down - vlookup and update source workbook that works great.
-  basically this one has a data table on one sheet and a vlookup sheet that shows the info from source through a drop down choice. It also allows updating the source by hitting the update button (VBA)

2) On the second one (expiry email) it has a dashboard where you push a button and it creates emails to send to the trainers that have expiring employees for license. (works great). There is additional code in this one where you add a name to the data table and it adds five names to the Expiry Date table (ExpDate) this also works great. I then manually add the five categories and copy down the vlookups and it works. This ExpDate sheet is needed for the email program to work.

Both WBs uses the same data table (Master Log) as the master information.

I want to combine these into one work book, but every time I try to do it I get errors in the VB. Something to do with the drop-down.

It would be awesome if I could get this working.
Thanks so much
Stripped-expiry-email.xlsm
Stripped-VlookUP-and-Update-only.xlsm
0
Comment
Question by:chris pike
[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
  • 5
  • 3
8 Comments
 
LVL 21

Expert Comment

by:Roy Cox
ID: 41791481
Does it matter which workbook you end up with?
0
 
LVL 21

Expert Comment

by:Roy Cox
ID: 41791508
Is this what you need?

I have deleted the unused rows in the Master Log Table - you don't need unused rows. Just add them as required.

The Data validation list is now linked to that table and will be dynamic as you add or remove names.
Stripped-expiry-email.xlsm
0
 

Author Comment

by:chris pike
ID: 41791737
I think I am missing a macro (it asks to update prompt right away when opening)
01-error.JPGor i get this one
02.JPGHmmmm
Probably something I am doing, Everything else seems to work Roy
Thanks Chris
......
It would be super super awesome in the ExpDate table if the Vlookup and the categories would auto copy and paste when the new name comes in from the Master Log sheet......

If possible
Thanks
Chris
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 21

Expert Comment

by:Roy Cox
ID: 41792265
I imported all the macros but I will check.

The VLOOKUP issue can probably be solved by using an Excel Table. I'll look at that as well.

It may be Sunday before I get time though
0
 
LVL 21

Accepted Solution

by:
Roy Cox earned 2000 total points
ID: 41792292
I don't get that error message but I have removed a link to the old file. The Update macro runs with no errors. I have debugged the whole workbook with no errors reported. Check this updated version

Can you tell me where the VLOOKUP formulas are. I'm not sure what should be updating
Stripped-expiry-email.xlsm
0
 

Author Comment

by:chris pike
ID: 41793421
Awesome Roy, Works Great.
Yah it was looking for a file on your computer.

Thanks so much.
0
 

Author Closing Comment

by:chris pike
ID: 41793422
Works awesome.
Thanks so much.
0
 
LVL 21

Expert Comment

by:Roy Cox
ID: 41793732
Pleased to help
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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