Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Named data into macro

Hello,

I have a named range on one sheet that I want copied to another sheet
when it is Activated

How do I get the macro to enter the data from a Named range?

Buzz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default Named data into macro

On Thu, 20 Mar 2008 14:16:00 -0700 (PDT), Buzz
wrote:

Hello,

I have a named range on one sheet that I want copied to another sheet
when it is Activated

How do I get the macro to enter the data from a Named range?

Buzz



Try this procedu

Sub copy_range_of_data(fromRange As Range, toRange As Range)
fromRange.Copy
ActiveSheet.Paste Destination:=toRange
Application.CutCopyMode = False
End Sub


Hope this helps / Lars-Åke

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Named data into macro

Hi
Put this code in the codesheet for the worksheet you want to copy to and
edit references to suit your needs.

Private Sub Worksheet_Activate()
Sheets("Sheet1").Range("NamedRange").Copy
ActiveSheet.Paste Destination:=Range("A1")
End Sub

Regards,

Per

"Buzz" skrev i meddelelsen
...
Hello,

I have a named range on one sheet that I want copied to another sheet
when it is Activated

How do I get the macro to enter the data from a Named range?

Buzz


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
named cell in macro Pa Maher Excel Discussion (Misc queries) 2 September 19th 07 02:18 AM
Q: Best way to take data from VBA into graphs without writing data to worksheets? (Can a named range refer to an array in memory only?) KR Excel Programming 2 December 16th 04 11:12 PM
New Named Range Created Each Time Data Imported into Excel via Macro Carroll Rinehart Excel Programming 2 October 28th 04 04:33 PM
Macro Using Named Cell Mark Bigelow Excel Programming 0 July 8th 03 07:40 PM
Macro Using Named Cell Dan E[_2_] Excel Programming 0 July 8th 03 07:29 PM


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