Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 200
Default Using Range Object With Two Variables

Try

..Range(UserName_Addr & ":" & Resp_Addr)

Alan Beban

ALATL wrote:
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not at all clear on use of variables and/or object variables JMay-Rke Excel Discussion (Misc queries) 11 July 4th 08 06:36 PM
Calling an Object using variables (What am I doing wrong????) Superman Excel Programming 2 May 2nd 07 05:25 PM
Object definition and structure, with variables Neal Zimm Excel Programming 6 February 24th 05 09:08 AM
Object variables scarbrough Excel Programming 3 December 6th 03 12:13 PM
Creating Object Variables - and passing them as arguements Ian Stanborough Excel Programming 3 November 11th 03 02:28 PM


All times are GMT +1. The time now is 03:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"