Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
At the beginning of the app I want to call subroutine if documents name are contained particular word.
I tried this code
If(WildMatch(DocumentTitle(), '*Input*'), Call Input_Sub);
And got this
Can't get what's wrong with the syntax. Can someone explain please?
You cannot call a subroutine inside a load statement. That's all. If you want to check the name of the document and based on that call a subroutine you shouldn't use a load statement, but something like:
For Each vFile in FileList('C:\Mydocs\*')
If WildMatch('$(vFile)', '*Input*') Then
Call Input_Sub
EndIf
Next
You cannot call a subroutine inside a load statement. That's all. If you want to check the name of the document and based on that call a subroutine you shouldn't use a load statement, but something like:
For Each vFile in FileList('C:\Mydocs\*')
If WildMatch('$(vFile)', '*Input*') Then
Call Input_Sub
EndIf
Next
I got it. Thank you mach GysBert for the help and explanation.