View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fan924 Fan924 is offline
external usenet poster
 
Posts: 238
Default closing a workbook with a macro


From a Macro, I have

Set wb1 = ActiveWorkbook
On Error Resume Next
Set wb2 = Workbooks("library.xls")
If wb2 Is Nothing Then
Set wb2 = Workbooks.Open("c:\My Documents\_MapForm\library.xls")
End If

before exiting the macro, is there a way I can close the workbook
"library.xls"???