View Single Post
 
Old 08-12-2015, 03:10 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your content doesn't have trailing 0s, it has leading 0s. That said, if you want to control the sort order of files whose name begins with 'Table', you can use:
x = Format(i , "000")
FileName = "C:\Users\VBA-beginner\Downloads\RPYC\CASS-Tables\Table_" & x & ".txt"
These files will have the same sort order as:
FileName = "C:\Users\VBA-beginner\Downloads\RPYC\CASS-Tables\" & x & "__Table_" & x & ".txt"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote