回答編集履歴

3

再度・・・

2019/10/11 03:08

投稿

ttyp03
ttyp03

score0

test CHANGED
@@ -92,21 +92,15 @@
92
92
 
93
93
  KINMU_DATE2 = strInFileLine2(1)
94
94
 
95
- NUM(1) = TIME_1_1
96
-
97
- NUM(2) = strInFileLine2(2)
98
-
99
- NUM(3) = strInFileLine2(3)
100
-
101
- NUM(4) = strInFileLine2(4)
102
-
103
95
  IF SYA_BG = SYA_BG2 AND KINMU_DATE = KINMU_DATE2 Then
104
96
 
105
- for i = 1 to 4
97
+ NUM_MAX = TIME_1_1 ' ★ここらへんまるっと修正
106
98
 
107
- if NUM_MAX < NUM(i) Then
99
+ for i = 2 to 4 ' ★2からに変更
108
100
 
101
+ if NUM_MAX < strInFileLine2(i) Then ' ★配列を直接参照
102
+
109
- NUM_MAX = NUM(i)
103
+ NUM_MAX = strInFileLine2(i)
110
104
 
111
105
  END IF
112
106
 

2

追加修正

2019/10/11 03:05

投稿

ttyp03
ttyp03

score0

test CHANGED
@@ -122,7 +122,9 @@
122
122
 
123
123
  objInfile2.Close ' ★追加
124
124
 
125
+ ' objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & TIME_1_1 ' ★削除して
126
+
125
- objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & TIME_1_1
127
+ objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & NUM_MAX ' ★これに変更
126
128
 
127
129
  Loop
128
130
 

1

指摘修正

2019/10/11 02:57

投稿

ttyp03
ttyp03

score0

test CHANGED
@@ -82,8 +82,6 @@
82
82
 
83
83
  TIME_1_1 = strInFileLine(2)
84
84
 
85
- NUM_MAX = TIME_1_1 ' ★追加
86
-
87
85
  Set objInFile2 = objFso.OpenTextFile(Path & "\" & InFile2, 1, False) ' ★ここに移動
88
86
 
89
87
  Do Until objInFile2.AtEndOfStream
@@ -94,13 +92,21 @@
94
92
 
95
93
  KINMU_DATE2 = strInFileLine2(1)
96
94
 
95
+ NUM(1) = TIME_1_1
96
+
97
+ NUM(2) = strInFileLine2(2)
98
+
99
+ NUM(3) = strInFileLine2(3)
100
+
101
+ NUM(4) = strInFileLine2(4)
102
+
97
103
  IF SYA_BG = SYA_BG2 AND KINMU_DATE = KINMU_DATE2 Then
98
104
 
99
- for i = 2 to 4 ' ★2からに変更
105
+ for i = 1 to 4
100
106
 
101
- if NUM_MAX < strInFileLine2(i) Then ' ★配列を直接参照
107
+ if NUM_MAX < NUM(i) Then
102
108
 
103
- NUM_MAX = strInFileLine2(i)
109
+ NUM_MAX = NUM(i)
104
110
 
105
111
  END IF
106
112
 
@@ -116,9 +122,7 @@
116
122
 
117
123
  objInfile2.Close ' ★追加
118
124
 
119
- ' objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & TIME_1_1 ' ★削除して
120
-
121
- objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & NUM_MAX ' ★これに変更
125
+ objOutFile.WriteLine SYA_BG & "," & KINMU_DATE & "," & TIME_1_1
122
126
 
123
127
  Loop
124
128