Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get an error when I try & pass the range object two variables. I have
tested this & it allows the use of one varaible. But I would like to use two variables to copy & paste cell A8:D8. Is there something wrong with my syntax or will I need to copy & paste one row at a time? Dim UserName_Addr As String ' Where UserName_Addr = A8 Dim Resp_Addr As String ' Where Resp_Addr = D8 'Copy columns A,B,C, and D from Sheet 1 to Sheet 2 With Sheets("Sheet1") .Range(.Range("UserName_Addr: Resp_Addr"), ..Range("A65536").End(xlUp)).Copy End With Sheets("Sheet2").[A65536].End(xlUp)(1).PasteSpecial Paste:=xlValues Thx! ALATL |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Calling an Object using variables (What am I doing wrong????) | Excel Programming | |||
Object definition and structure, with variables | Excel Programming | |||
Object variables | Excel Programming | |||
Creating Object Variables - and passing them as arguements | Excel Programming |