LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Runtime Error 1004

Further, if I remove the dot before the
Range("L2").Select
It works, but not necessaarily on the right sheet.


-----Original Message-----
My worksheets are protected with UserModeOnly = True

I have a piece of code

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

It stops on the
..Range("L2").Select
with a Runtime Error 1004 - Protected and Read Only.
BUt this cell is unlocked.

If I move the
..Range("L4").Select
before the
..Range("L2").Select
it stops there insttead.

If I move the
..Range("L2").Select
before the
..Range("J2,L2,L4").Select
it works, but not with the required behaviour.

Can anyone tell me why it's stopping on a Range.Select ?
Will a Cell.Select work where a Range.Select will mot ?

Thanks,

Don.

.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error 1004 JB Bates[_2_] Excel Discussion (Misc queries) 5 December 29th 09 02:40 PM
runtime error 1004 HELP PLS Marcelo P Excel Discussion (Misc queries) 2 May 23rd 07 08:56 PM
runtime error '1004' Steve Excel Discussion (Misc queries) 1 April 28th 06 08:58 PM
runtime error 1004 valdesd Excel Discussion (Misc queries) 0 October 12th 05 05:30 PM
runtime error 1004 Adella Excel Programming 2 July 29th 03 08:07 PM


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"