Insert Row

Papi

Well-known Member
Joined
May 22, 2007
Messages
1,592
We have an odd thing happen (Excel 2010 with Excel 2003 file) when we do two particular steps in a form. The first step is to simply copy a cell to paste in other cells or in outlook. The next one is a section where we run a macro to open a hidden formatted row and have that macro enter the date the note was created and another date as a two day default follow up. If cell copy was not done then the second macro works fine 100% of the time. What happens when the copy occurs followed by the line writing the new line creates what was in memory from Column I to IV and typically very high in appearance depending on how much data was in memory.

This is the macro:

Sub ASN_Coordinator()
'
' Activity_Summary_Note Macro
'
' Keyboard Shortcut: Ctrl+Shift+C
'
Application.ScreenUpdating = False
Application.Goto Reference:="Activity_Summary_Start"
ActiveCell.Offset(3, 0).Range("A1").Select
Selection.EntireRow.Insert
Application.Goto Reference:="Hidden_Row_SAW"
Selection.Copy
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveCell.Select
ActiveCell.FormulaR1C1 = "=TODAY()"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "C"
ActiveCell.Offset(0, 1).Range("A1:C1").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveCell.Offset(0, 4).Range("A1").Select
ActiveCell.FormulaR1C1 = "=RC[-6]+2"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(0, -6).Range("A1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveCell.Offset(0, -2).Range("A1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Application.ScreenUpdating = True
ActiveCell.Offset(0, 2).Range("A1").Select
End Sub

Is it possible to see what may be written wrong to copy the cell in memory for 248 cells? And possible a fix or some form of dump feature to put in front of the second macro. By the way, a person can simply delete the new row and the macro works fine after that.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,551
Messages
6,179,476
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top