+ Reply to Thread
Results 1 to 2 of 2

Combing data from worksheets in a directory.

Hybrid View

  1. #1
    Registered User
    Join Date
    03-23-2007
    Posts
    17

    Combing data from worksheets in a directory.

    Hi everyone.

    Im still having a bit of trouble editing some code to fit the way i
    want it.


    I am using the KBase article 'Combine All Data From All Worksheets in
    All Workbooks in a Specified Directory' posted by mvida from
    http://vbaexpress.com/kb/getarticle.php?kb_id=773.


    1) Instead of scrolling through every worksheet in the tWB workbook, i
    only want to use one. ("Dashboard")


    2) I want to predefine the range i want copied. (A8:Z14)


    Thanks in advance.
    Nick

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388
    Quote Originally Posted by nickm687
    1) Instead of scrolling through every worksheet in the tWB workbook, i
    only want to use one. ("Dashboard")
    Delete
    For Each tWS In tWB.Worksheets 'loop through each sheet
    and replace with
    Set tWS = tWB.Worksheets("Dashboard")
    delete
    Next 'tWS
    Quote Originally Posted by nickm687
    2) I want to predefine the range i want copied. (A8:Z14)
    Delete
    Set uRange = tWS.Range("A2", tWS.Cells(tWS.UsedRange.Row + tWS.UsedRange.Rows _
                    .Count - 1, tWS.UsedRange.Column + tWS.UsedRange.Columns.Count - 1)) 'set used range
    and replace with
    Set uRange = tWS.Range("A8:Z14")

+ 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