View Single Post
 
Old 03-06-2015, 01:22 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
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

The 8 digits check requires two changes

1. In the FileSaveAs macro immediately before the line 'Next oCC'
add:
Code:
           If oCC.Title = "Personeelsnummer" Then
                If Len(oCC.Range) > 8 Then
                    MsgBox "'Personeelsnummer' mag alleen 8 cijfers hebben."
                    GoTo lbl_Exit
                End If
            End If
2. In the 'GetFilename' function add the line
Code:
strNumber = Format(strNumber, "00000000")
immediately after 'Next oCC'

Translation to Dutch courtesy of Google, so feel free to fix the grammar
__________________
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