Runtime Error 1004

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Further, if I remove the dot before the
Range("L2").Select
It works, but not necessaarily on the right sheet.
 
Why do you need to select L2 or L4 by themselves.

With Worksheets(MySheet)
.Cells.Select
.Paste
Application.CutCopyMode = False
.Range("J2,L2,L4").Replace _
What:="Sheet1", _
Replacement:=LinkTo, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
.Move Before:=Sheets(1)
End With

Should still work the way you want it to.
 
Thanks Tom

The only reason I do any of this is beacause of a bug that
prevents me from Copying more than 3 sheets in a Session,
but the issue is not the Replace, it's the fact that
things don't work even though I have UserModeOnly enabled.

I even have a routine that invokes UserModeOnly in every
Sub as a workaround to another bug.

Don.
 
Back
Top