rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 574
- Office Version
- 365
- Platform
- Windows
I am looking for a way to see if the workbook name contains the word "Template". If so, I want the macro to prompt the user to save the file. I have the code listed below, but it does not seem to give the correct response. How do I get this to work?
Thanks for the support.
Code:
If ThisWorkbook.Name = "*Template*" Then
MsgBox "The workbook does NOT contain the word Template in the name."
Exit sub
Else
MsgBox "The workbook DOES contain the word Template in the name."
Call Save_This_File
End If
Thanks for the support.