1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
Sub Sheet_resistance()
Dim WB As Workbook
Dim TreatedFile As Workbook
Dim Counter As Variant 'Declaration de counter
Dim a As Integer 'declaration de la varaible a comme nombre entier
Dim maximum As String
Dim minimum As String
Dim i As Integer
Dim j As Integer
i = 4
j = 1
Set WB = ThisWorkbook 'creation d'un nouveau fichier
Counter = Application.GetOpenFilename(",*.map", , , , True)
If VarType(Counter) = vbBoolean Then Exit Sub
For a = 1 To UBound(Counter)
Set TreatedFile = Application.Workbooks.Open(Counter(a), xlMSDOS)
With TreatedFile
newname = Worksheets(1).Name
For i = 4 To 8
For j = 1 To 5
If Worksheets(1).Cells(i, j).Value = 0 Then
Worksheets(1).Cells(i, j).Value = Replace(Worksheets(1).Cells(i, j).Value, "0", " ")
End If
Next j
Next i
maximum = Application.WorksheetFunction.max(range(Cells(4, 1), Cells(9, 5)))
minimum = Application.WorksheetFunction.Min(range(Cells(4, 1), Cells(9, 5)))
.Close (False)
End With
i = 4
j = 1
Next a 'fin condition |
Partager