csehz
asked on
VBA Excel 2010 - ActiveWorkbook.Name
Dear Experts,
Could you please advise how to write a check in VBA, which would analyse the active workbook name whether the file name contains characters "OVD"?
So for example if the file name is "OVD_0922.xlsx" in that case the answer is True, if "Book1.xls" in that case False.
thanks,
Could you please advise how to write a check in VBA, which would analyse the active workbook name whether the file name contains characters "OVD"?
So for example if the file name is "OVD_0922.xlsx" in that case the answer is True, if "Book1.xls" in that case False.
thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks it works
If ActiveWorkbook.Name Like "*OVD*" Then
MsgBox "The active workbook had OVD in it's name
End If