Results 1 to 1 of 1

Auto-populating data from multiple sheets HELP!

Threaded View

  1. #1
    Registered User
    Join Date
    05-08-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2000
    Posts
    3

    Auto-populating data from multiple sheets HELP!

    I have a spreadsheet which has multiple sheets (one per staff member), all identical, and have been using the code below to copy the data from the individual sheets onto a Master sheet entitled "Team Data".

    In theory the code was working fine, however as this workbook has to be a shared workbook between the staff some problems have cropped up.

    The sheets use columns A to J (With Row A containing identical headings) and the number of rows requiring to be copied vary.

    Since I've been using this a s a shared book I have found that when a staff member makes changes and saves, it overwrites previous saves by other staff (this seems to be overwriting not only on the main spreadsheet but also between tabs.... so if user 1 fills in tab 1, user 2 fills in tab 2....when saving tab 1 is overwritten with tab 2 data.

    Any idea's how to fix this??

    Private Sub Worksheet_Activate()
    Dim Sheet As Worksheet
    For Each Sheet In Me.Parent.Sheets
        If Sheet.Name <> Me.Name Then
            If Sheet.Cells(Rows.Count, 1).End(xlUp).Row <> 1 Then
                Sheet.Range(Sheet.Cells(2, 1), Sheet.Cells(Sheet.Cells(Rows.Count, 1).End(xlUp).Row, 10)).Copy Destination:=Me.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
    
            End If
        Else
            Me.Range(Cells(2, 1), Cells(Rows.Count, 10)).Clear
        End If
    Next Sheet
    End Sub
    Last edited by JennyJAL; 05-13-2009 at 06:45 AM.

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