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.
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.