View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AD108 AD108 is offline
external usenet poster
 
Posts: 72
Default VALIDATE WB NAME

I attemped to use the following code to force users to save the workbook
with a certain name.
It is not working, and produces ambiguous results. Any ideas.

Thanks in advance.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim filename As String
filename = Application.GetSaveAsFilename
If Not UCase(filename) Like "*AIR CONTAINER*" Then
MsgBox "Save with correct name"
Cancel = True
Else
Cancel = False
End If

End Sub