|
-
Mar 4th, 2006, 11:06 AM
#1
Thread Starter
Junior Member
Names, Ranges and Offsets
I use the following code to copy the contents of a named range
VB Code:
srcwbk.Names(nameFull).RefersToRange.Copy
If I wanted to use the whole range - except for the first row, is there and easy way to acheive this.
Thanks,
Richard
-
Mar 6th, 2006, 09:59 AM
#2
Re: Names, Ranges and Offsets
This should get you started.
VB Code:
Sub BenbuinRange()
Dim nameFull As String
Dim rngFullRange As Range
Dim rngNoHeader As Range
nameFull = "testrange"
Set rngFullRange = ThisWorkbook.Names(nameFull).RefersToRange
With rngFullRange
Set rngNoHeader = .Range(.Cells(2, 1), .Cells(.Rows.Count, .Columns.Count))
End With
rngNoHeader.Copy
'rest of your code
Set rngFullRange = Nothing
Set rngNoHeader = Nothing
End Sub
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|