You are comparing a worksheet object to a text value. Do this instead:
If wsShtToSave.Name = "Master" Then
Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on
VB macros for Excel
"oldjay" wrote in message
...
Why won't this work?
oldjayo
Sub test()
Dim wsShtToSave As Worksheet
Set wsShtToSave = ActiveSheet
If wsShtToSave= "Master" Then
ActiveWorkbook.Save
ActiveWorkbook.Close
End If
End Sub