Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Copy destination

This does just what I want:

Sub TestTransfer()
Sheets("Pages").Cells(10, 5).Copy Destination:=Sheets("Schedule").Cells(5,
2)
Sheets("Pages").Cells(10, 3).Copy Destination:=Sheets("Schedule").Cells(5,
3)
End Sub

except it copies across the formatting and well as the contents.

I want contents only copied across.

Please - thanks.

Francis Hookham


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy destination

Hi Francis,

Try something like:

'=============
PublicSub TestTransfer()
With Sheets("Schedule")
.Cells(5, 2).Value = Sheets("Pages").Cells(10, 5).Value
.Cells(5, 3).Value = Sheets("Pages").Cells(10, 3).Value
End With
End Sub
'<<=============


---
Regards,
Norman


"Francis Hookham" wrote in message
...
This does just what I want:

Sub TestTransfer()
Sheets("Pages").Cells(10, 5).Copy Destination:=Sheets("Schedule").Cells(5,
2)
Sheets("Pages").Cells(10, 3).Copy Destination:=Sheets("Schedule").Cells(5,
3)
End Sub

except it copies across the formatting and well as the contents.

I want contents only copied across.

Please - thanks.

Francis Hookham



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy destination

Hi Don,

Ranges must be the same size.


Perhaps, in the context of my code, you could expand your comments?

By the way, did you try the code?


---
Regards,
Norman


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy destination

Hi Francis,

A slight typo!

Replace:

PublicSub TestTransfer()


with

Public Sub TestTransfer()


---
Regards,
Norman


Reply
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
Help with copy destination David Excel Programming 3 July 26th 06 09:51 AM
VBA .copy destination jerredjohnson Excel Discussion (Misc queries) 2 July 18th 06 11:18 PM
Copy destination problem Casey[_49_] Excel Programming 4 February 24th 06 11:50 PM
copy destination values Pete[_23_] Excel Programming 1 March 22nd 05 05:40 PM
.Copy Destination:= .PasteSpecial ??? myBasic[_2_] Excel Programming 2 November 12th 04 11:11 AM


All times are GMT +1. The time now is 07:18 PM.

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

About Us

"It's about Microsoft Excel"