View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mrbalaje mrbalaje is offline
external usenet poster
 
Posts: 24
Default AutoRun a macro on Closing

I have recorded a macro. Macro coding given below. All I want to autorun this
macro whenever I close the spreadsheet.



Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/22/2007 by balaje.rangachari
'
' Keyboard Shortcut: Ctrl+Shift+P
'
Range("C6:C13").Select
Selection.Copy
Range("A6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("C15").Select
Application.CutCopyMode = False
End Sub