Code:
Sub STEP1()
Dim AnyWb As Workbook
    For Each AnyWb In Workbooks
        If AnyWb.Name <> "Book1.xlsm" Then
        AnyWb.Close Savechanges = False
        Else
        End If
    Next AnyWb
End Sub
problem solved code works perfect no doubt in it
But i have one question i just downloaded the file and by default it is in a opened state & after that i open vba macro placed file and when i run the code its not working
but i download the file if file is opened and i close that file and again i open that file and then i open the vba placed file and ran the macro then code works
Any idea about this problem
is this problem solvable bcoz i already have the code to close the file but u r a profession vba programmer so i thought if u provide me the code then problem can be solved