Hi board,
I've opened a file with data I want to transfer to a template-file. When the import is successfully processed, I 'Save As' the template file using the name of the current source. The source file must of course first be closed. To get the name of the file which must first be closed, I've written the following Function. I need simple syntax help please on the line w/ "?????." Users could theoretically use alt-Tab to see the name and enter it to an input box but I try to minimize liveware interface
/*
Function zReadAllOpenXLSs() As String 'OpenWorkbooks As String)
'
' Find filename matching a YYMMDDXX pattern
' Added to read Source W/B for imported puzle
' 2/20/18 at St. John's Hospital
'
Dim x As Long
Dim cPattern As String
Dim OpenWorkbooks() As String
ReDim OpenWorkbooks(1 To Workbooks.Count)
'Store Names Here
For x = 1 To Workbooks.Count
OpenWorkbooks(x) = Workbooks(x).Name
Next x
'Close Workbooks Here
For x = 1 To Workbooks.Count
cPattern = Left(OpenWorkbooks(x), 8)
If cPattern Like "999999XX" Then ' ???????
zReadAllOpenXLSs = OpenWorkbooks(x)
Exit For
End If
Next x
End Function
*/
I've opened a file with data I want to transfer to a template-file. When the import is successfully processed, I 'Save As' the template file using the name of the current source. The source file must of course first be closed. To get the name of the file which must first be closed, I've written the following Function. I need simple syntax help please on the line w/ "?????." Users could theoretically use alt-Tab to see the name and enter it to an input box but I try to minimize liveware interface
/*
Function zReadAllOpenXLSs() As String 'OpenWorkbooks As String)
'
' Find filename matching a YYMMDDXX pattern
' Added to read Source W/B for imported puzle
' 2/20/18 at St. John's Hospital
'
Dim x As Long
Dim cPattern As String
Dim OpenWorkbooks() As String
ReDim OpenWorkbooks(1 To Workbooks.Count)
'Store Names Here
For x = 1 To Workbooks.Count
OpenWorkbooks(x) = Workbooks(x).Name
Next x
'Close Workbooks Here
For x = 1 To Workbooks.Count
cPattern = Left(OpenWorkbooks(x), 8)
If cPattern Like "999999XX" Then ' ???????
zReadAllOpenXLSs = OpenWorkbooks(x)
Exit For
End If
Next x
End Function
*/