Good Morning All,
I have a series of files in a different set of directories.
Each set of files is different within itself (in naming convention).
I have made a formula, in one case, that I would like to pass to an all- purpose function that will parse some info and then zip the appropriate file.
So the formual is Mid(somefile,2,2), in this particular case.
I would like to pass this to the function because it will change when the directory changes because of the file naming structure.
I have tried the obvious: searchPattern = "Mid(somefile,2,2)"
Unfortunately this gives me just that when I pass searchpattern to the function, I can't seem to get it to actually become a formula again.
Example of issue:
Needless to say this is just a mocked down sample of the actual code, which is a little more involved, although simple in keeping with my simple mind.
Any ideas, criticizms, suggestions will be greatly appreciated.
rnpIII
I have a series of files in a different set of directories.
Each set of files is different within itself (in naming convention).
I have made a formula, in one case, that I would like to pass to an all- purpose function that will parse some info and then zip the appropriate file.
So the formual is Mid(somefile,2,2), in this particular case.
I would like to pass this to the function because it will change when the directory changes because of the file naming structure.
I have tried the obvious: searchPattern = "Mid(somefile,2,2)"
Unfortunately this gives me just that when I pass searchpattern to the function, I can't seem to get it to actually become a formula again.
Example of issue:
Code:
sub getfileinfo
SearchPattern = "Mid(fn,2,2)" 'this formula will change with each different file directory.
funFileZip SearchPattern
End sub
Function funfileZip (SearchPattern)
If SearchPattern = DateTarget Then
NewFileArray(i) = f
Count = Count + 1
End If
end Function
Needless to say this is just a mocked down sample of the actual code, which is a little more involved, although simple in keeping with my simple mind.
Any ideas, criticizms, suggestions will be greatly appreciated.
rnpIII