Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
In using the range method "copy" I have run into some issues with syntax. Below is some code. I have three statements for copying the range to a specified destination. Two methods work. But when I use parentheses around the argument, I get an error. I've encountered this before. Why would I get an error when putting the argument in parentheses? Sub Copy_Ranges() Dim source_range As Range Dim dest_location As Range Set source_range = Worksheets("Sheet1").Range("A1:B2") Set dest_location = Worksheets("Sheet1").Range("A10") source_range.Copy Destination dest_location ' this works fine source_range.Copy Destination:=dest_location ' this works fine source_range.Copy(dest_location) ' this one results in an error End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax question | Excel Worksheet Functions | |||
syntax question | Excel Programming | |||
syntax question | Excel Programming | |||
Syntax question | Excel Programming | |||
VBA Syntax Question? | Excel Programming |