SparrowHawk
08-28-2004, 07:39 AM
I work with several sheets in my workbook that use identical ranges so rather than go through the process of defining them each time I use them I figured it would be easier to just name them and use them from a public module.
What I need to do is to copy the data from the selected sheet (activesheet) to the "Input Sheet". The target cells on the "Input Sheet" are different however. I have a module to handle global code so in the declarations I set:
Public "Range1" as Range
In the module sub I have tried:
sub Copy()
Range("B4:B23").Name = "Range1"
'Lines of code to copy go here
end sub
The problem is that nothing I try seems to be able to copy the values of Range1 to the target cells on the "Input Sheet" without generating a syntax error.
Hopefully this is somewhat clearly stated. How do I work with named ranges?:dunno
Thanks
Ken
What I need to do is to copy the data from the selected sheet (activesheet) to the "Input Sheet". The target cells on the "Input Sheet" are different however. I have a module to handle global code so in the declarations I set:
Public "Range1" as Range
In the module sub I have tried:
sub Copy()
Range("B4:B23").Name = "Range1"
'Lines of code to copy go here
end sub
The problem is that nothing I try seems to be able to copy the values of Range1 to the target cells on the "Input Sheet" without generating a syntax error.
Hopefully this is somewhat clearly stated. How do I work with named ranges?:dunno
Thanks
Ken