Results 1 to 3 of 3

specifying a range using a variable

Threaded View

tryer specifying a range using a... 10-26-2008, 11:49 AM
shg Here's one way: ... 10-26-2008, 12:03 PM
tryer Thanks Shg, I would never... 10-26-2008, 12:08 PM
  1. #1
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    specifying a range using a variable

    This is just a simple question but I can't seem to find the answer in any of the hepl files. I want to refer to a range by using a variable but can't get the syntax right.
    for example instead of
    Range("AA3:AH3").Select
        Selection.AutoFill Destination:=Range("AA7:AH7"), Type:=xlFillDefault
    which copies down the selected range I would like the row numbers be variables such as
    Range("AA(rownum):AH(rownum)").Select
        Selection.AutoFill Destination:=Range("AA(final):AH(final)"), Type:=xlFillDefault
    but what I have doesn't work
    Last edited by tryer; 10-26-2008 at 12:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1