LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ERROR IN CODE


Hi Paul,

Have a look at http://www.j-walk.com/ss/excel/tips/tip36.htm for
copying multiple selections.
I haven't tested it but I'm guessing that this could be adapted to
paste the links instead of the values by adding
Dim PasteLinkRange As Range
to the top of the macro & replacing the line
"SelAreas(i).Copy PasteRange.Offset(RowOffset, ColOffset)"
with the following lines:
"SelAreas(i).Copy 'PasteRange.Offset(RowOffset, ColOffset)
Set PasteLinkRange = PasteRange.Offset(RowOffset, ColOffset)
PasteLinkRange.Select
ActiveSheet.Paste Link:=True"

Maybe I'm misunderstanding but why don't you select the ranges as
d2:j66 & d74:j75 (since the ranges aare side by side) rather than as
below?...

Paul Wrote:

i would like to select ranges d2:h66 and d74:h75 in sheet 1 and paste
it as
a link to the new sheet 2 .

then i would like to select the next 2 ranges (i2:j66 and i74:j75) in
worksheet 1 and paste them as a link to worksheet 2 in the next
column,


John's code should put you on the right track to looping through a list
of ranges but if you have any problems just ask.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=535091

 
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
Code error M&M[_2_] Excel Discussion (Misc queries) 4 July 13th 07 12:20 AM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
Add-in Error , code help James[_14_] Excel Programming 4 November 20th 03 07:52 PM


All times are GMT +1. The time now is 09:37 AM.

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"