Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use a button to copy the values of one range to another


Please give me some help with this

I have a range on Sheet1 and a range of the same dimension on
Sheet2 . I need code for a button on Sheet1 that when pressed copies
the values of the range on Sheet2 into the range on Sheet1

THANK You


--
SuitedAces
------------------------------------------------------------------------
SuitedAces's Profile: http://www.excelforum.com/member.php...o&userid=35840
View this thread: http://www.excelforum.com/showthread...hreadid=556302

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Use a button to copy the values of one range to another

Hi SuitedAccess,

Try:
'=============
Public Sub Tester()
Dim rng1 As Range
Dim rng2 As Range

With ThisWorkbook
Set rng1 = .Sheets("Sheet1").Range("A1:D10") '<<== CHANGE
Set rng2 = .Sheets("Sheet2").Range("C1:F10") '<<== CHANGE
End With

rng1.Copy Destination:=rng2

End Sub
'<<=============


---
Regards,
Norman



"SuitedAces" wrote
in message ...

Please give me some help with this

I have a range on Sheet1 and a range of the same dimension on
Sheet2 . I need code for a button on Sheet1 that when pressed copies
the values of the range on Sheet2 into the range on Sheet1

THANK You


--
SuitedAces
------------------------------------------------------------------------
SuitedAces's Profile:
http://www.excelforum.com/member.php...o&userid=35840
View this thread: http://www.excelforum.com/showthread...hreadid=556302



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Use a button to copy the values of one range to another

SuitesdAces, something like this,

Sheet1.Range("A1:A20").Value= Sheet2.Range("A1:A20").Value

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"SuitedAces" wrote
in message ...

Please give me some help with this

I have a range on Sheet1 and a range of the same dimension on
Sheet2 . I need code for a button on Sheet1 that when pressed copies
the values of the range on Sheet2 into the range on Sheet1

THANK You


--
SuitedAces
------------------------------------------------------------------------
SuitedAces's Profile:

http://www.excelforum.com/member.php...o&userid=35840
View this thread: http://www.excelforum.com/showthread...hreadid=556302



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use a button to copy the values of one range to another


Gentlemen

I have tested both methods with success !

Thank you both very much.


--
SuitedAces
------------------------------------------------------------------------
SuitedAces's Profile: http://www.excelforum.com/member.php...o&userid=35840
View this thread: http://www.excelforum.com/showthread...hreadid=556302

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
copy, split and transpose a range of values Lucas Budlong Excel Programming 0 April 5th 06 11:36 AM
look up a set of values,copy a range of data into 2nd file new_to_vba[_8_] Excel Programming 1 February 7th 06 04:21 PM
Creating a Button to add to existing values while subtracting range C. A. Zan Excel Programming 1 February 23rd 04 10:07 AM
copy / paste values for certain range Eric Dreshfield Excel Programming 2 September 10th 03 04:04 PM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


All times are GMT +1. The time now is 11:14 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"