Thread
:
How to "match" partial file name
View Single Post
#
2
Posted to microsoft.public.excel.programming
Ardus Petus
external usenet poster
Posts: 718
How to "match" partial file name
if left(FName,3) = "EM_" then
call NotAllowed
--
AP
"BEEJAY" a écrit dans le message de news:
...
Greetings:
When file is open and special menu item selected, the first thing that
needs to be done is determine if the file name start with "EM_".
If if does, then call up message, "not allowed" and exit
if is doesn't, then continue with process.
Please see my efforts, below
Sub CheckFileName()
' if File Name starts with 'EM_', then process is not allowed.
' When click on OK, exit macro project
' If does NOT start with 'EM_', then Proceed
' Call EMailAnswerC1A
Dim FName As String
If FName = "EM_*" Then
Call NotAllowed
Else: Call EMailAnswerC1A
End If
How (or what) can I use as a wild card, to make this work.
(there is no fixed file name length)
Reply With Quote
Ardus Petus
View Public Profile
Find all posts by Ardus Petus