next
03-14-2008, 12:05 PM
Sub Workbook_BeforeClose()
Dim decision As VbMsgBoxResult
decision = MsgBox("Overwrite LTD Open?", vbYesNo + vbQuestion)
If decision = vbYes Then ThisWorkbook.SaveAs "S:\xxxxxx\LTD\LTD Open.xls", xlExcel9795
If decision = vbNo Then ThisWorkbook.Close
End Sub
My problem is that the file that needs to run this is in "dif" format, and if i save it in "ThisWorkbook" macro always dissapears. Is there a way to make this a module and just call it out from my Personal Workbook?
Dim decision As VbMsgBoxResult
decision = MsgBox("Overwrite LTD Open?", vbYesNo + vbQuestion)
If decision = vbYes Then ThisWorkbook.SaveAs "S:\xxxxxx\LTD\LTD Open.xls", xlExcel9795
If decision = vbNo Then ThisWorkbook.Close
End Sub
My problem is that the file that needs to run this is in "dif" format, and if i save it in "ThisWorkbook" macro always dissapears. Is there a way to make this a module and just call it out from my Personal Workbook?