Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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"??? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
wb2.close savechanges:=false 'or true
Fan924 wrote: 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"??? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
wb2.close savechanges:=false 'or true
Thanks again Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Set macro to run automatically when closing workbook? | Excel Discussion (Misc queries) | |||
Closing Excel with Personal Macro Workbook | Excel Discussion (Misc queries) | |||
Closing a workbook from a macro doesn't close the workbook | Excel Programming | |||
Problem with closing workbook in macro | Excel Programming | |||
Problem closing a workbook using a macro | Excel Programming |