View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
T_Amee T_Amee is offline
external usenet poster
 
Posts: 6
Default paste special over copy data

PERFECT!!!!! thanks so much!

Thanks!
Tara


"T_Amee" wrote:

Good Morning,

I have the following macro which works great except the paste section is
pasting over the copy so it asks if I want to replace. The answer will
always be yes but I don't know how to add that as part of the macro and
record doesn't seem to capture that mouse click. Thoughts?

Sub ConvertTargetDate()
'
' ConvertTargetDate Macro
'

'
Columns("E:F").Select
Selection.Insert Shift:=xlToRight
Columns("D:D").Select
Selection.TextToColumns Destination:=Range("D1"), DataType:=xlDelimited, _
TextQualifier:=xlNone, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=" ", FieldInfo:=Array(1, 3), TrailingMinusNumbers:=True
Columns("E:F").Select
Selection.Delete Shift:=xlToLeft
Range("D9:D5000").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("D:D").Select
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yyyy"
Range("D9").Select
End Sub