Champers
06-25-2009, 03:16 AM
Hi all,
I have got a very simple problem which I can't get my head around.
When I open a workbook, it automatically opens the PMASTER2009 workbook as well with the following code, which is great.
Sub OpenMaster()
'
' OpenMaster Macro
'
Set wbOne = ActiveWorkbook
Workbooks.Open "S:\Eng\PMASTER2009.XLSB"
wbOne.Activate
'
End Sub
However when I close the active workbook I would like it too close the active workbook and the PMASTER 2009 saving all changes.
I have tried the following:
Sub CloseMaster()
'
' CloseMaster Macro
'
ActiveWorkbook.Close True
Workbooks.Close ""S:\Eng\PMASTER2009.XLSB"
wbOne.Close
End Sub
However I am not sure what else to try.
Any help would be much appreciated as it should probably be simple and I can't get my head around it.
Kind Regards
Champers
I have got a very simple problem which I can't get my head around.
When I open a workbook, it automatically opens the PMASTER2009 workbook as well with the following code, which is great.
Sub OpenMaster()
'
' OpenMaster Macro
'
Set wbOne = ActiveWorkbook
Workbooks.Open "S:\Eng\PMASTER2009.XLSB"
wbOne.Activate
'
End Sub
However when I close the active workbook I would like it too close the active workbook and the PMASTER 2009 saving all changes.
I have tried the following:
Sub CloseMaster()
'
' CloseMaster Macro
'
ActiveWorkbook.Close True
Workbooks.Close ""S:\Eng\PMASTER2009.XLSB"
wbOne.Close
End Sub
However I am not sure what else to try.
Any help would be much appreciated as it should probably be simple and I can't get my head around it.
Kind Regards
Champers