Macro created in english is not working in French environment/Laptop

guruprasadch

New Member
Joined
May 22, 2017
Messages
7
Team,
My excel file with macros is working just fin in my laptop (configured for US English language) but the same file throws below error message when my colleagues in Paris with French OS try to open it.

Error Message: “Excel encountered non readable content in the file. Do you want to recover the content of this file? If it is reliable, click yes”.

I tried searching on net, found conflicting answers; some posts asked to change some formulae which are not supported in French language or to convert whole macro into French. However some other posts suggested that Excel-97 onward its language neutral.


Please help me solve this problem, and let me know if you need additional information or code snippet .


Regards,
Guruprasad C H
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
excel does have region specific languages, in my footer is a link to a translator. I wouldn't expect to see your error message though, to me that is a damaged file, any other files you could test ?
 
Upvote 0
Does the error only occur if your macro is run? If so, we'd need to see the code.
 
Upvote 0
Thanks for the quick response. Translator may be a work around for time being but not complete solution in my case; as I need to keep exchanging this file between 'English and 'French' environments.

Regarding files being damaged-> same file opens without any error in 'English' environment. We have also tried with different files, but problem persists.
 
Upvote 0
But have you already run the macro on the file? What I want to know is whether there is a problem with the file if you have never run the macro on it. If there is, then the code is irrelevant. If there isn't, then there is something that the code does that causes the problem.
 
Upvote 0
Yes, i have run macro it works just fine in English installation environment. but the same file when i try to run on French installation, it is giving this error. Attached code snippet for more information.

Code:
Sub PopulateData_Click()

Dim LastColumn As Long
Dim i As Long
Dim ProjectPath As String
Dim Destination As String
Dim PT As PivotTable
Dim pvtsrc As String
Dim ColName As String
Dim sprinttb As ListObject
Dim flag As Integer


flag = 0

Set sprinttb = ActiveWorkbook.Sheets("InputData").ListObjects("Table11")

On Error GoTo ErrorHandler

    For i = 1 To sprinttb.Range.Rows.Count
        
        If Not sprinttb.DataBodyRange Is Nothing Then
            If sprinttb.DataBodyRange.Cells(i, 1).Value = "Start Date" Then
                If sprinttb.DataBodyRange.Cells(i, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 1, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 5, 2).Value = "" Then
                    flag = 1
                    Exit For
                End If
            End If
        End If
    Next



If flag = 1 Then
    MsgBox ("Please fill Sprint start date/end date/committed story points and then try!")
Else
    
    'MsgBox "Ensure that manual input fields are properly filled", vbInformation, "Warning!"

    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    
    Sheets("TFSDump").Activate
    
    LastColumn = ActiveWorkbook.Sheets("TFSDump").Cells(2, 1).End(xlToRight).Column
    
    ProjectPath = Sheets("TFSDump").Cells(2, LastColumn).Value
    
    If Sheets("TFSDump").Cells(2, LastColumn).Value = "Current Sprint Items" Then
        Destination = Sheets("TFSDump").Cells(3, LastColumn - 5).Address
    Else
        Destination = ActiveWorkbook.Sheets("TFSDump").Cells(3, LastColumn + 1).Address
    End If
    
    
    
    
    'find the column containing Iteration Path
    For i = 1 To LastColumn
    
        If ActiveWorkbook.Sheets("TFSDump").Cells(2, i).Value = "Iteration Path" Then
            ProjectPath = ActiveWorkbook.Sheets("TFSDump").Cells(2, i).EntireColumn.Address
            Exit For
        End If
        
    Next
    
    
    If ProjectPath = "" Then
        MsgBox ("TFS Dump is not correct")
    ElseIf ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn).Value <> "Current Sprint Items" Then
    
            
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 1).Select
        ActiveCell.FormulaR1C1 = "Program"
    
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 2).Select
        ActiveCell.FormulaR1C1 = "Project"
    
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 3).Select
        ActiveCell.FormulaR1C1 = "Release"
    
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 4).Select
        ActiveCell.FormulaR1C1 = "Sprint"
        
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 5).Select
        ActiveCell.FormulaR1C1 = "Closed in Current Sprint"
        
        ActiveWorkbook.Sheets("TFSDump").Cells(2, LastColumn + 6).Select
        ActiveCell.FormulaR1C1 = "Current Sprint Items"
        
    
        TexttoColumn i, Destination
       
            
    Else
    
        TexttoColumn i, Destination
       
            
    End If
    
    
    InsertFormula "Created Date", 0
    
    InsertFormula "Closed Date", 1
    
    Disconnect_All_Slicer
    
    Refresh_All_PivotTables
    
    Add_Slicers
    
    Sheets("InputData").Activate
    Range("A1").Select
    
    Application.ScreenUpdating = True
    Application.DisplayAlerts = True
    
    
    MsgBox ("Data populated successfully.")
    

End If

ErrorHandler:
    If Err.Number <> 0 Then
        msg = "Below error occured; Please contact IT PMO." & vbNewLine & vbNewLine & Err.Description
        
        MsgBox msg, , "Error"
    
    End If
            

End Sub



Private Sub ConfirmData_Click()

    flag = 0
    Set sprinttb = ActiveWorkbook.Sheets("InputData").ListObjects("Table11")
    
       For i = 1 To sprinttb.Range.Rows.Count
        
        If Not sprinttb.DataBodyRange Is Nothing Then
            If sprinttb.DataBodyRange.Cells(i, 1).Value = "Start Date" Then
                If sprinttb.DataBodyRange.Cells(i, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 1, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 2, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 3, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 4, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 5, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 11, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 12, 2).Value = "" Or sprinttb.DataBodyRange.Cells(i + 13, 2).Value = "" Then
                    flag = 1
                    Exit For
                End If
            End If
        End If
    Next
    
    If flag = 1 Then
        MsgBox ("Please fill all manual input fields and then try!")
    Else
        UpdateReleaseTable
    End If
    
End Sub
 
Last edited by a moderator:
Upvote 0
That code calls a lot of other routines - it would be helpful to see those.
 
Upvote 0
Hi,

Please ensure the code has no numbers used in names or variables, so ctr2, ctr3 and it wont work...

Thanks

milenia
 
Upvote 0
Hello RoryA,
Please find here the routines/functions/procedures

Code:
    Sub TexttoColumn(ColIndex As Long, DestCell)

    ActiveWorkbook.Sheets("TFSDump").Activate
    ActiveWorkbook.Sheets("TFSDump").Cells(3, ColIndex).Select
    ActiveWorkbook.Sheets("TFSDump").Range(ActiveCell, ActiveCell.End(xlDown)).Select
    
    Application.DisplayAlerts = False
        
    Selection.TextToColumns Destination:=Range(DestCell), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
    Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
    :="", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
    TrailingMinusNumbers:=True
    
    
    Application.DisplayAlerts = True

End Sub
Sub InsertFormula(columnname As String, j As Integer)

Dim LastColumn As Integer
Dim i As Integer
Dim formula As String
Dim sprinttb As ListObject
Dim sd As Integer
Dim ed As Integer
Dim tbcolumn As String

    Set sprinttb = ActiveWorkbook.Sheets("InputData").ListObjects("Table11")
    
    For i = 1 To sprinttb.Range.Rows.Count
        
        If Not sprinttb.DataBodyRange Is Nothing Then
        
            If sprinttb.DataBodyRange.Cells(i, 1).Value = "Start Date" Then
                sd = sprinttb.DataBodyRange.Cells(i, 2).Row
                ed = sd + 1
                Exit For
                
            End If
            
        End If
        
        
    Next
    
    
    LastColumn = ActiveWorkbook.Sheets("TFSDump").Cells(2, 1).End(xlToRight).Column
    
    For i = 1 To LastColumn

    If ActiveWorkbook.Sheets("TFSDump").Cells(2, i).Value = columnname Then
        If j = 1 Then
            i = LastColumn - i - j
            Exit For
        Else
            i = LastColumn - i
            Exit For
        End If
    End If
    
    Next
    
    tbcolumn = ActiveWorkbook.Sheets("TFSDump").Cells(3, LastColumn - j).ListObject.Name
    
    If j = 1 Then
        tbcolumn = tbcolumn & "[Closed in Current Sprint]"
    Else
        tbcolumn = tbcolumn & "[Current Sprint Items]"
    End If
    
    
    formula = "=IF(AND(RC[-" & i & "]>InputData!R" & sd & "C4,RC[-" & i & "]<(InputData!R" & ed & "C4+1)),""Yes"",""No"")"
    
    ActiveWorkbook.Sheets("TFSDump").Range(tbcolumn).Value = formula


End Sub





Sub Disconnect_All_Slicer()


Dim oSliceCache As SlicerCache
Dim PT As PivotTable
Dim i As Long

For Each oSliceCache In ThisWorkbook.SlicerCaches

    oSliceCache.Delete
    
Next oSliceCache


End Sub

Sub Refresh_All_PivotTables()

Dim sheet As Worksheet

Dim PT As PivotTable



    For Each sheet In ThisWorkbook.Worksheets
    
        For Each PT In sheet.PivotTables
        
                PT.RefreshTable
                'PT.Update
        
        Next PT
    
    Next sheet
    

End Sub

Sub Add_Slicers()


Dim oSliceCache As SlicerCache
Dim PT As PivotTable
Dim test As String
        
        Sheets("InputData").Select
       
        ActiveWorkbook.SlicerCaches.Add(ActiveSheet.PivotTables("InputData_PivotTable1"), _
        "Release").Slicers.Add ActiveSheet, , "SRelease", "All Releases", 165.75, 441, 144, _
        198.75
      
        ActiveWorkbook.SlicerCaches.Add(ActiveSheet.PivotTables("InputData_PivotTable1"), _
        "Sprint").Slicers.Add ActiveSheet, , "SSprint", "Sprints", 165.75, 441, 144, _
        198.75
        
        
        ActiveWorkbook.SlicerCaches("Slicer_Release").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable1"))
        'ActiveWorkbook.SlicerCaches("Slicer_Release").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable3"))
        ActiveWorkbook.SlicerCaches("Slicer_Release").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable4"))
        'ActiveWorkbook.SlicerCaches("Slicer_Release").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable14"))
        ActiveWorkbook.SlicerCaches("Slicer_Release").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable5"))
        
        ActiveWorkbook.SlicerCaches("Slicer_Sprint").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable1"))
        'ActiveWorkbook.SlicerCaches("Slicer_Sprint").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable3"))
        ActiveWorkbook.SlicerCaches("Slicer_Sprint").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable4"))
        'ActiveWorkbook.SlicerCaches("Slicer_Sprint").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable14"))
        ActiveWorkbook.SlicerCaches("Slicer_Sprint").PivotTables.AddPivotTable (ActiveSheet.PivotTables("InputData_PivotTable5"))
        
        
        ActiveSheet.Shapes.Range(Array("SRelease")).Select
        Selection.Cut
        Range("K69").Select
        ActiveSheet.Paste
        
        ActiveSheet.Shapes.Range(Array("SSprint")).Select
        Selection.Cut
        Range("M69").Select
        ActiveSheet.Paste
        
        
        
        Sheets("Release Report").Select
        
        ActiveWorkbook.SlicerCaches.Add(ActiveSheet.PivotTables("Release_PivotTable8"), _
        "Release").Slicers.Add ActiveSheet, , "RRelease", "Reported Release", 165.75, 441, 144, _
        198.75
        
        ActiveWorkbook.SlicerCaches("Slicer_Release1").PivotTables.AddPivotTable (ActiveSheet.PivotTables("Release_PivotTable9"))
        ActiveWorkbook.SlicerCaches("Slicer_Release1").PivotTables.AddPivotTable (ActiveSheet.PivotTables("Release_PivotTable7"))
        ActiveWorkbook.SlicerCaches("Slicer_Release1").PivotTables.AddPivotTable (ActiveSheet.PivotTables("Release_PivotTable6"))
        'ActiveWorkbook.SlicerCaches("Slicer_Release1").PivotTables.AddPivotTable (ActiveSheet.PivotTables("Release_PivotTable4"))

        ActiveSheet.Shapes.Range(Array("RRelease")).Select
        Selection.Cut
        Range("H5").Select
        ActiveSheet.Paste
        

End Sub


Sub UpdateReleaseTable()

    Dim tb As ListObject
    Dim flag As Integer
    Dim rowinsert As String
    Dim j As Integer
    Dim test As String
    Dim sprinttb As ListObject
    Dim defsumtb As ListObject
    Dim defcattb As ListObject
    
    flag = 0

    ActiveWorkbook.Sheets("InputData").Activate
    
    Set tb = ActiveSheet.ListObjects("Table6")
    Set sprinttb = ActiveSheet.ListObjects("Table11")
    Set defsumtb = ActiveSheet.ListObjects("Table9")
    Set defcattb = ActiveSheet.ListObjects("Table3")
    
    For i = 1 To tb.Range.Rows.Count
        
        If Not tb.DataBodyRange Is Nothing Then
        
            If tb.DataBodyRange.Cells(i, 1).Value = sprinttb.DataBodyRange.Cells(1, 2).Value Then
                
                If tb.DataBodyRange.Cells(i, 2).Value = sprinttb.DataBodyRange.Cells(2, 2).Value Then
                                   
                    flag = 1
                    Exit For
                
                End If
                
            End If
            
        End If
        
        
    Next
    
    If flag = 1 Then
    
        If MsgBox("This sprint data is already available in release table;" & vbNewLine & "Would you like to overwrite it?", vbOKCancel, "Warning Message") = vbCancel Then
            Exit Sub
        Else
        
            tb.DataBodyRange.Cells(i, 3) = sprinttb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 4) = sprinttb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 5) = sprinttb.DataBodyRange.Cells(5, 2)
            tb.DataBodyRange.Cells(i, 6) = sprinttb.DataBodyRange.Cells(6, 2)
            tb.DataBodyRange.Cells(i, 7) = sprinttb.DataBodyRange.Cells(7, 2)
            tb.DataBodyRange.Cells(i, 8) = sprinttb.DataBodyRange.Cells(8, 2)
            tb.DataBodyRange.Cells(i, 9) = sprinttb.DataBodyRange.Cells(9, 2)
            tb.DataBodyRange.Cells(i, 10) = sprinttb.DataBodyRange.Cells(10, 2)
            tb.DataBodyRange.Cells(i, 11) = sprinttb.DataBodyRange.Cells(11, 2)
            tb.DataBodyRange.Cells(i, 12) = sprinttb.DataBodyRange.Cells(13, 2)
            tb.DataBodyRange.Cells(i, 13) = sprinttb.DataBodyRange.Cells(14, 2)
            tb.DataBodyRange.Cells(i, 14) = sprinttb.DataBodyRange.Cells(15, 2)
            tb.DataBodyRange.Cells(i, 15) = sprinttb.DataBodyRange.Cells(16, 2)
            tb.DataBodyRange.Cells(i, 16) = sprinttb.DataBodyRange.Cells(17, 2)
            tb.DataBodyRange.Cells(i, 17) = defsumtb.DataBodyRange.Cells(1, 2)
            tb.DataBodyRange.Cells(i, 18) = defsumtb.DataBodyRange.Cells(2, 2)
            tb.DataBodyRange.Cells(i, 19) = defsumtb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 20) = defsumtb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 21) = defsumtb.DataBodyRange.Cells(1, 3)
            tb.DataBodyRange.Cells(i, 22) = defsumtb.DataBodyRange.Cells(2, 3)
            tb.DataBodyRange.Cells(i, 23) = defsumtb.DataBodyRange.Cells(3, 3)
            tb.DataBodyRange.Cells(i, 24) = defsumtb.DataBodyRange.Cells(4, 3)
            tb.DataBodyRange.Cells(i, 25) = defsumtb.DataBodyRange.Cells(1, 4)
            tb.DataBodyRange.Cells(i, 26) = defsumtb.DataBodyRange.Cells(2, 4)
            tb.DataBodyRange.Cells(i, 27) = defsumtb.DataBodyRange.Cells(3, 4)
            tb.DataBodyRange.Cells(i, 28) = defsumtb.DataBodyRange.Cells(4, 4)
            tb.DataBodyRange.Cells(i, 29) = defsumtb.DataBodyRange.Cells(1, 5)
            tb.DataBodyRange.Cells(i, 30) = defsumtb.DataBodyRange.Cells(2, 5)
            tb.DataBodyRange.Cells(i, 31) = defsumtb.DataBodyRange.Cells(3, 5)
            tb.DataBodyRange.Cells(i, 32) = defsumtb.DataBodyRange.Cells(4, 5)
            tb.DataBodyRange.Cells(i, 33) = defsumtb.DataBodyRange.Cells(1, 6)
            tb.DataBodyRange.Cells(i, 34) = defsumtb.DataBodyRange.Cells(2, 6)
            tb.DataBodyRange.Cells(i, 35) = defsumtb.DataBodyRange.Cells(3, 6)
            tb.DataBodyRange.Cells(i, 36) = defsumtb.DataBodyRange.Cells(4, 6)
            tb.DataBodyRange.Cells(i, 37) = defcattb.DataBodyRange.Cells(1, 2)
            tb.DataBodyRange.Cells(i, 38) = defcattb.DataBodyRange.Cells(2, 2)
            tb.DataBodyRange.Cells(i, 39) = defcattb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 40) = defcattb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 41) = defcattb.DataBodyRange.Cells(5, 2)
            tb.DataBodyRange.Cells(i, 42) = defcattb.DataBodyRange.Cells(6, 2)
            tb.DataBodyRange.Cells(i, 43) = defcattb.DataBodyRange.Cells(7, 2)
            tb.DataBodyRange.Cells(i, 44) = defcattb.DataBodyRange.Cells(8, 2)
            tb.DataBodyRange.Cells(i, 45) = defcattb.DataBodyRange.Cells(9, 2)
            tb.DataBodyRange.Cells(i, 46) = defcattb.DataBodyRange.Cells(10, 2)
            tb.DataBodyRange.Cells(i, 47) = defcattb.DataBodyRange.Cells(11, 2)
            tb.DataBodyRange.Cells(i, 48) = defcattb.DataBodyRange.Cells(12, 2)
            tb.DataBodyRange.Cells(i, 49) = defcattb.DataBodyRange.Cells(13, 2)
            tb.DataBodyRange.Cells(i, 50) = defcattb.DataBodyRange.Cells(14, 2)
            tb.DataBodyRange.Cells(i, 52) = sprinttb.DataBodyRange.Cells(12, 2)
            tb.DataBodyRange.Cells(i, 51) = sprinttb.DataBodyRange.Cells(18, 2)
            tb.DataBodyRange.Cells(i, 53) = sprinttb.DataBodyRange.Cells(20, 2)
            ActiveWorkbook.Save
        End If
        
        
    ElseIf flag = 0 Then
    
        

        i = tb.Range.Rows.Count
           
        If Not tb.DataBodyRange Is Nothing Then
            rowinsert = tb.DataBodyRange.Cells(i + 1, 1).Address
            ActiveWorkbook.Sheets("InputData").Range(rowinsert).Offset(0, -2).Select
            Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
        End If
            
            tb.DataBodyRange.Cells(i, 1) = sprinttb.DataBodyRange.Cells(1, 2)
            tb.DataBodyRange.Cells(i, 2) = sprinttb.DataBodyRange.Cells(2, 2)
            tb.DataBodyRange.Cells(i, 3) = sprinttb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 4) = sprinttb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 5) = sprinttb.DataBodyRange.Cells(5, 2)
            tb.DataBodyRange.Cells(i, 6) = sprinttb.DataBodyRange.Cells(6, 2)
            tb.DataBodyRange.Cells(i, 7) = sprinttb.DataBodyRange.Cells(7, 2)
            tb.DataBodyRange.Cells(i, 8) = sprinttb.DataBodyRange.Cells(8, 2)
            tb.DataBodyRange.Cells(i, 9) = sprinttb.DataBodyRange.Cells(9, 2)
            tb.DataBodyRange.Cells(i, 10) = sprinttb.DataBodyRange.Cells(10, 2)
            tb.DataBodyRange.Cells(i, 11) = sprinttb.DataBodyRange.Cells(11, 2)
            tb.DataBodyRange.Cells(i, 12) = sprinttb.DataBodyRange.Cells(13, 2)
            tb.DataBodyRange.Cells(i, 13) = sprinttb.DataBodyRange.Cells(14, 2)
            tb.DataBodyRange.Cells(i, 14) = sprinttb.DataBodyRange.Cells(15, 2)
            tb.DataBodyRange.Cells(i, 15) = sprinttb.DataBodyRange.Cells(16, 2)
            tb.DataBodyRange.Cells(i, 16) = sprinttb.DataBodyRange.Cells(17, 2)
            tb.DataBodyRange.Cells(i, 17) = defsumtb.DataBodyRange.Cells(1, 2)
            tb.DataBodyRange.Cells(i, 18) = defsumtb.DataBodyRange.Cells(2, 2)
            tb.DataBodyRange.Cells(i, 19) = defsumtb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 20) = defsumtb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 21) = defsumtb.DataBodyRange.Cells(1, 3)
            tb.DataBodyRange.Cells(i, 22) = defsumtb.DataBodyRange.Cells(2, 3)
            tb.DataBodyRange.Cells(i, 23) = defsumtb.DataBodyRange.Cells(3, 3)
            tb.DataBodyRange.Cells(i, 24) = defsumtb.DataBodyRange.Cells(4, 3)
            tb.DataBodyRange.Cells(i, 25) = defsumtb.DataBodyRange.Cells(1, 4)
            tb.DataBodyRange.Cells(i, 26) = defsumtb.DataBodyRange.Cells(2, 4)
            tb.DataBodyRange.Cells(i, 27) = defsumtb.DataBodyRange.Cells(3, 4)
            tb.DataBodyRange.Cells(i, 28) = defsumtb.DataBodyRange.Cells(4, 4)
            tb.DataBodyRange.Cells(i, 29) = defsumtb.DataBodyRange.Cells(1, 5)
            tb.DataBodyRange.Cells(i, 30) = defsumtb.DataBodyRange.Cells(2, 5)
            tb.DataBodyRange.Cells(i, 31) = defsumtb.DataBodyRange.Cells(3, 5)
            tb.DataBodyRange.Cells(i, 32) = defsumtb.DataBodyRange.Cells(4, 5)
            tb.DataBodyRange.Cells(i, 33) = defsumtb.DataBodyRange.Cells(1, 6)
            tb.DataBodyRange.Cells(i, 34) = defsumtb.DataBodyRange.Cells(2, 6)
            tb.DataBodyRange.Cells(i, 35) = defsumtb.DataBodyRange.Cells(3, 6)
            tb.DataBodyRange.Cells(i, 36) = defsumtb.DataBodyRange.Cells(4, 6)
            tb.DataBodyRange.Cells(i, 37) = defcattb.DataBodyRange.Cells(1, 2)
            tb.DataBodyRange.Cells(i, 38) = defcattb.DataBodyRange.Cells(2, 2)
            tb.DataBodyRange.Cells(i, 39) = defcattb.DataBodyRange.Cells(3, 2)
            tb.DataBodyRange.Cells(i, 40) = defcattb.DataBodyRange.Cells(4, 2)
            tb.DataBodyRange.Cells(i, 41) = defcattb.DataBodyRange.Cells(5, 2)
            tb.DataBodyRange.Cells(i, 42) = defcattb.DataBodyRange.Cells(6, 2)
            tb.DataBodyRange.Cells(i, 43) = defcattb.DataBodyRange.Cells(7, 2)
            tb.DataBodyRange.Cells(i, 44) = defcattb.DataBodyRange.Cells(8, 2)
            tb.DataBodyRange.Cells(i, 45) = defcattb.DataBodyRange.Cells(9, 2)
            tb.DataBodyRange.Cells(i, 46) = defcattb.DataBodyRange.Cells(10, 2)
            tb.DataBodyRange.Cells(i, 47) = defcattb.DataBodyRange.Cells(11, 2)
            tb.DataBodyRange.Cells(i, 48) = defcattb.DataBodyRange.Cells(12, 2)
            tb.DataBodyRange.Cells(i, 49) = defcattb.DataBodyRange.Cells(13, 2)
            tb.DataBodyRange.Cells(i, 50) = defcattb.DataBodyRange.Cells(14, 2)
            tb.DataBodyRange.Cells(i, 52) = sprinttb.DataBodyRange.Cells(12, 2)
            tb.DataBodyRange.Cells(i, 51) = sprinttb.DataBodyRange.Cells(18, 2)
            tb.DataBodyRange.Cells(i, 53) = sprinttb.DataBodyRange.Cells(20, 2)
            ActiveWorkbook.Save
    End If
    
    
    
End Sub
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,215,446
Messages
6,124,899
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top