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: 30
Default copying values in a range

I got this code from the community . When I give the range value from
G9:G195, it works fine. When I modified the range to exclude formulas as
detailed below it gives run time error message 450. I request to be
informed what went wrong with this?

Sub Open_To_Close()
Dim ClosingRange As Range
Dim OpeningRange As Range
Set ClosingRange = ActiveSheet.Range("g9:g12", "g17:g22", "g28:g39", "g45",
"g48", "g62:g84", "g89:g98", "g106", "g112:g114", "g142:g147", "g149:g152",
"g157:g168", "g170:g176", "g178:g185", "g189:g195")
Set OpeningRange = Worksheets(ActiveSheet.Index + 1).Range("e9:e12",
"e17:e22", "e28:e39", "e45", "e48", "e62:e84", "e89:e98", "e106",
"e112:e114", "e142:e147", "e149:e152", "e157:e168", "e170:e176", "e178:e185",
"e189:e195")
OpeningRange.Value = ClosingRange.Value
End Sub

Thanks in advance

 
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
copying values in range srinivasan Excel Programming 5 August 27th 05 08:58 AM
Copying Range Names and values from one tab to another Rob Slagle[_3_] Excel Programming 1 August 9th 05 07:12 PM
Copying a range of values between worksheets Christopher R. Lee Excel Programming 2 February 6th 05 09:08 PM
Searching a range and copying values into a new range.... **Please help** :( Lancia Excel Programming 1 September 29th 04 01:08 PM
Copying a particular range of values from one sheet to another in excel anoop_2000 Excel Programming 2 June 17th 04 03:46 AM


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