Thread: [Solved] Outlook / Excel Integration
View Single Post
 
Old 10-16-2016, 09:12 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I lost the will to live halfway through your code but it seems that you are altering an existing worksheet to create a new one. Why not simply start with a new blank one? In any case it would be better not to open the existing workbook, but to create a new one from it. That would be at least the ideal starting point.

You can change the macro I posted code not to open the workbook, but to add a workbook using it as a template. That workbook will be unnamed, so you will need to save it before closing it.

I'll take you at your Word that your macro does what you want (it crashes here as I don't have your workbook), but note that you do not need to select ranges/cells in order to process them.

Call the macro with the command (e.g.)

Code:
xlApp.Run "PERSONAL.XLSB!FleetMatics"
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote