Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that I need to (1) insert a line, (2) copy/paste values only,
(3) copy/paste normal (contents of cell), and (4) delete a line. This currently works only in the cell(s) where I created the macro. How can I modify the macro so that it will execute anywhere (in different sheets, that is) ? Here is the code: Sub copypaste() ' ' copypaste Macro ' ' Rows("526:526").Select Selection.Insert Shift:=xlDown Rows("525:525").Select Selection.Copy Rows("526:526").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("F527:H527").Select Application.CutCopyMode = False Selection.Copy Range("F525").Select ActiveSheet.Paste Rows("527:527").Select Application.CutCopyMode = False Selection.Delete Shift:=xlUp End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
The Relative Macro | Excel Discussion (Misc queries) | |||
relative value in macro | Excel Discussion (Misc queries) | |||
Data navigation macro | Excel Programming | |||
navigation macro freezes | Excel Programming | |||
relative ref. macro | Excel Programming |