SHARE
TWEET

Untitled

a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.  
  3. Dim Output As String
  4.  
  5. Output = MsgBox("Are you ready to export the data?", vbYesNo, "Data Export")
  6.  
  7. If Output = vbYes Then
  8.  
  9. 'Summary Page (APD+MTC)
  10.  
  11. 'APD Premium
  12.  
  13. Worksheets("SEC 1 (APD)").Range("AJ" & Cells.Rows.Count).End(xlUp).Copy
  14.  
  15. Workbooks.Open Filename:="S:US DivAccountsParamount2017 DataSummary2017 Summary - Edit.xlsm"
  16.  
  17. Workbooks("2017 Summary - Edit.xlsm").Worksheets("Input P").Activate
  18.  
  19. Range("C18").PasteSpecial Paste:=xlPasteValues, operation:=xlNone, _
  20. SkipBlanks:=False, Transpose:=False
  21.  
  22. ActiveWorkbook.Close SaveChanges:=True
  23.  
  24. End If
  25.  
  26. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top