View Single Post
 
Old 08-30-2017, 05:21 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

I am no longer sure what it is that you are trying to do. Earlier you said the filename was
00001-STIS-CV-00
That being the case your code cannot possibly work e.g.
Take the line
Code:
strRef = "KR-A359-STR-" & vRef(1) & "-" & vRef(2) & "-" & vRef(3) & "-" & vRef(4)
That line cannot work as vRef(4) does not exist. I guess it should be
Code:
strRef = "KR-A359-STR-" & vRef(0) & "-" & vRef(1) & "-" & vRef(2) & "-" & vRef(3)
vRef(0) is 00001
vRef(1) is
STIS
vRef(2) is CV
vRef(3) is 00
__________________
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