Posted to microsoft.public.excel.programming
|
|
Sheet to close
Activesheet.name=
try this simpler version
Sub CloseifMaster()
If ActiveSheet.Name = "Master" Then
With ActiveWorkbook
'one dot only
.Save
.Close
End With
End If
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"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
|