Solved

Excel VBA combine two working workbooks

Posted on 2016-09-09
8
38 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
  • 5
  • 3
8 Comments
 
LVL 17

Expert Comment

by:Roy_Cox
Comment Utility
Does it matter which workbook you end up with?
0
 
LVL 17

Expert Comment

by:Roy_Cox
Comment Utility
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
Comment Utility
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
 
LVL 17

Expert Comment

by:Roy_Cox
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 17

Accepted Solution

by:
Roy_Cox earned 500 total points
Comment Utility
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
Comment Utility
Awesome Roy, Works Great.
Yah it was looking for a file on your computer.

Thanks so much.
0
 

Author Closing Comment

by:chris pike
Comment Utility
Works awesome.
Thanks so much.
0
 
LVL 17

Expert Comment

by:Roy_Cox
Comment Utility
Pleased to help
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now