G
Guest
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
8. 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
tested this & it allows the use of one varaible. But I would like to use two
variables to copy & paste cell A8
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
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