+ Reply to Thread
Results 1 to 2 of 2

How To Reference Range Inactive Workbook

  1. #1
    Registered User
    Join Date
    02-09-2005
    Location
    TX
    Posts
    8

    How To Reference Range Inactive Workbook

    Hi Gang,

    New to VBA programming...

    I understand how to use .End on Active worksheet: varLocal = Range("A1", Range("A1").End(xlDown)).Value

    I understand how to reference a range on an inactive Workbook so that:
    varDistant = Workbooks("ElseWhere.xls").Worksheets("Sheet1").Range("C10").Value


    I need to combine them ????? So that:

    varDistant=Workbooks("ElseWhere.xls").Worksheets("Sheet1").Range("A1", Range("A1").End(xlDown)).Value

    But I keep getting errors, Is there something wrong with my syntax ?

  2. #2
    Registered User
    Join Date
    02-09-2005
    Location
    TX
    Posts
    8
    I got it...

    To get an array from the range
    It needs to be broken into 2 steps so that...

    Set varDistantRange = Workbooks("BookT1.xls").Worksheets("Sheet1").Range("A1", Range("A1").End(xlDown))

    varArray = varDistantRange.Value

+ Reply to Thread

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