Results 1 to 5 of 5

Macro Connect the same values in others worksheets in different files..

Threaded View

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    99

    Macro Connect the same values in others worksheets in different files..

    Hi Everybody!

    T need your help, about a macro to connect the same values in other worksheets:
    I have a Master Data, (name: ACO.xls) and others sub excel files (ACO-001-12.xls, ACO-002-12.xls, ACO-003-12.xls, etc) How do I put the values the same values in only ACO.xls but in multiple files automatically:

    Example:
    Sub GetData_selecciondatos()
        Dim SaveDriveDir As String, MyPath As String
        Dim FName As Variant
    
        SaveDriveDir = CurDir
        MyPath = Application.DefaultFilePath '= "C:\ACO"
        ChDrive MyPath
        ChDir MyPath
        FName = Application.GetOpenFilename(filefilter:="Excel Files, *.xl*")
    
        If FName = False Then
            'do nothing
        Else
            GetData FName, "ACI", "B6:C6", Sheets("ACO").Range("D2"), False, False
            GetData FName, "ACI", "B7:B7", Sheets("ACO").Range("F2"), False, False
            GetData FName, "ACI", "B8:B8", Sheets("ACO").Range("G2"), False, False
            GetData FName, "ACI", "C8:C8", Sheets("ACO").Range("H2"), False, False
            GetData FName, "ACI", "E8:E8", Sheets("ACO").Range("I2"), False, False
            GetData FName, "ACI", "G8:G8", Sheets("ACO").Range("J2"), False, False
            GetData FName, "ACI", "B10:B10", Sheets("ACO").Range("K2"), False, False
            GetData FName, "ACI", "B11:B11", Sheets("ACO").Range("L2"), False, False
            GetData FName, "ACI", "B20:B20", Sheets("ACO").Range("M2"), False, False
            GetData FName, "ACI", "E24:E24", Sheets("ACO").Range("N2"), False, False
            GetData FName, "ACI", "B21:B21", Sheets("ACO").Range("O2"), False, False
            GetData FName, "ACI", "B17:B17", Sheets("ACO").Range("P2"), False, False
            
        End If
    
        ChDrive SaveDriveDir
        ChDir SaveDriveDir
    End Sub
    In this example, only show me information in to first archive (aco-001-12.xls), but ..
    I attach the data.
    Thanks a lot!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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