Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Am I able to run procedures as per the following code? I thought seeing as it is a Private Sub in module "B4Close" that it would run automatically before the workbook closes. Private Sub Workbook_BeforeClose(Cancel As Boolean) Call CopyData1 MsgBox "Data copied, now click OK to save and close" ThisWorkbook.Save Application.EnableEvents = False Application.DisplayAlerts = False Cancel = True End Sub I just want to duplicate data from cells on sheet1 to sheet2 and then save (and remove the "Do you want to save..." dialog) before the Workbook closes. Can anyone guide me on this one? Kartune85. -- kartune85 ------------------------------------------------------------------------ kartune85's Profile: http://www.excelforum.com/member.php...o&userid=35586 View this thread: http://www.excelforum.com/showthread...hreadid=555427 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_BeforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming | |||
workbook_beforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming | |||
Workbook_BeforeClose | Excel Programming |