View Single Post
 
Old 11-06-2018, 05:05 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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

Change all the Variant variables to Long variables and it will work as you intend.
It would also have been preferable to have added your further question to your earlier post rather than start a new one.
To add code tags, select Go Advanced select the code and use the # button.
It is advisable to use Option Explicit to start your modules as this forces you to declare variables and makes errors easier to spot. You can set the VBA editor options to do this automatically.
__________________
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