Results 1 to 5 of 5

VBA Inactive Worksheets

Threaded View

  1. #1
    Registered User
    Join Date
    11-29-2007
    Posts
    15

    VBA Inactive Worksheets

    I am having trouble referencing a range in an inactive worksheet to feed an vba array. this is the following vba code that does not work:

    temparray = Sheets("Raw_Data").Range(Cells(5, 1), Cells(4 + max, LCnum * 6 + 3))
    The error I get is:
    Run-time error '1004'

    Application-defined or object-defined error
    It will work if I activate the sheet but I'm trying to avoid that. The code that will work but trying to avoid is:

        Sheets("Raw_Data").Activate
        temparray = Sheets("Raw_Data").Range(Cells(5, 1), Cells(4 + max, LCnum * 6 + 3))
    Last edited by tsc35; 12-17-2009 at 11:38 AM.
    Thanks,
    Travis

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