Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You can use Private Sub Workbook_BeforeClose (Cancel as Boolean) .... your code... End sub "mrbalaje" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autorun macro | Excel Discussion (Misc queries) | |||
AutoRun Macro | Excel Worksheet Functions | |||
Autorun macro | Excel Worksheet Functions | |||
MACRO AUTORUN | Excel Discussion (Misc queries) | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming |