Solved

Excel VBA combine two working workbooks

Posted on 2016-09-09
8
71 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 19

Expert Comment

by:Roy_Cox
ID: 41791481
Does it matter which workbook you end up with?
0
 
LVL 19

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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 19

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 19

Accepted Solution

by:
Roy_Cox earned 500 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 19

Expert Comment

by:Roy_Cox
ID: 41793732
Pleased to help
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 …
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…
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 …

737 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