PDA

View Full Version : Solved: Quit Application if filename is renamed



jammer6_9
01-15-2009, 09:38 AM
How can I code this.


Private Sub Workbook_Activate()
If "workbook.filename <> book1.xls" then
application.quit

Else
'Open the Workbook"

End if

nst1107
01-15-2009, 09:45 AM
Private Sub Workbook_Activate()
If ThisWorkbook.Name <> "Book1.xls" Then Application.Quit
End Sub

jammer6_9
01-15-2009, 09:55 AM
:friends: