level 3
Sub test()
Dim pth As String, fn As String, ary(), tmpMax As Long, i As Integer
Dim wb As Workbook
pth = "D:\data\" 'C:\Users\30920\Pictures\Camera Roll
fn = Dir(pth & "*.jpg") '
i = 0: tmpMax = 0
Do While fn <> ""
If fn <> ThisWorkbook.Name Then
i = i + 1
ReDim Preserve ary(i) '
ary(i) = --Left(Right(fn, 13), 8) '
If ary(i) > tmpMax Then tmpMax = ary(i) '
End If
fn = Dir
Loop
TextToDisplay = "(pth & " namelist " & tmpMax & ".jpg", , True)
End Sub
2019年07月04日 03点07分
