Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark
 
Posts: n/a
Default Sub BUandSave2()

how can i adapt the following macro to run when you exit
the workbook instead of when i save.

Sub BUandSave2()
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs
Filename:="T:\Invoices\Batch Book" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


thanks

mark
  #2   Report Post  
 
Posts: n/a
Default

hi,
Put the code in the on close event of the thisWorkbook
module.

-----Original Message-----
how can i adapt the following macro to run when you exit
the workbook instead of when i save.

Sub BUandSave2()
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs
Filename:="T:\Invoices\Batch Book" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


thanks

mark
.

  #3   Report Post  
mark
 
Posts: n/a
Default

cheers
-----Original Message-----
hi,
Put the code in the on close event of the thisWorkbook
module.

-----Original Message-----
how can i adapt the following macro to run when you

exit
the workbook instead of when i save.

Sub BUandSave2()
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs
Filename:="T:\Invoices\Batch Book" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub


thanks

mark
.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"