Remove remaining Chinese characters

This commit is contained in:
updsv7
2026-04-13 11:26:11 +09:00
parent ce1a81be84
commit 08c2112a36

View File

@@ -120,7 +120,7 @@ Sub ImportMasterDetailData()
Dim code As String
Dim lastRow As Long
Dim r As Long
' Target this worksheet (空欄マスタ)
' Target this worksheet
Set wsTarget = Me
' === Step 1: Select CSV file ===
@@ -151,7 +151,7 @@ Sub ImportMasterDetailData()
Exit Sub
End If
' === Step 3: Collect CSV codes and data (include all columns including コード and 券種) ===
' === Step 3: Collect CSV codes and data ===
Dim csvData As Object
Set csvData = CreateObject("Scripting.Dictionary")
@@ -181,11 +181,11 @@ NextCsvLine:
dataArray = Split(lines(i), ",")
' CSV col 1 -> C
' CSV col 1 -> C column
code = CleanCSVField(CStr(dataArray(0)))
wsTarget.Cells(writeRow, 3).Value = code
' CSV col 2-11 -> G-P
' CSV col 2-11 -> G-P column
If UBound(dataArray) >= 1 Then wsTarget.Cells(writeRow, 7).Value = CleanCSVField(CStr(dataArray(1)))
If UBound(dataArray) >= 2 Then wsTarget.Cells(writeRow, 8).Value = CleanCSVField(CStr(dataArray(2)))
If UBound(dataArray) >= 3 Then wsTarget.Cells(writeRow, 9).Value = CleanCSVField(CStr(dataArray(3)))
@@ -197,7 +197,7 @@ NextCsvLine:
If UBound(dataArray) >= 9 Then wsTarget.Cells(writeRow, 15).Value = CleanCSVField(CStr(dataArray(9)))
If UBound(dataArray) >= 10 Then wsTarget.Cells(writeRow, 16).Value = CleanCSVField(CStr(dataArray(10)))
' Auto-fill D, E columns from 区間メンテナンス
' Auto-fill D, E columns
Call FillFromKukanMaster(wsTarget, writeRow, False)
' G column has value → trigger F dropdown
@@ -316,25 +316,25 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long, Optional ByV
kValue = Trim(ws.Cells(rowNum, 11).Value)
If jValue = "" Then
errorMsg = "J列は必須項目です。"
errorMsg = "J column is required。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If Not IsNumeric(jValue) Then
errorMsg = "Jmust be numeric。"
errorMsg = "J columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If kValue = "" Then
errorMsg = "K列は必須項目です。"
errorMsg = "K column is required。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If Not IsNumeric(kValue) Then
errorMsg = "Kmust be numeric。"
errorMsg = "K columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
@@ -347,31 +347,31 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long, Optional ByV
pValue = Trim(ws.Cells(rowNum, 16).Value)
If lValue <> "" And Not IsNumeric(lValue) Then
errorMsg = "Lmust be numeric。"
errorMsg = "L columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If mValue <> "" And Not IsNumeric(mValue) Then
errorMsg = "Mmust be numeric。"
errorMsg = "M columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If nValue <> "" And Not IsNumeric(nValue) Then
errorMsg = "Nmust be numeric。"
errorMsg = "N columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If oValue <> "" And Not IsNumeric(oValue) Then
errorMsg = "Omust be numeric。"
errorMsg = "O columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
If pValue <> "" And Not IsNumeric(pValue) Then
errorMsg = "Pmust be numeric。"
errorMsg = "P columnmust be numeric。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
@@ -390,7 +390,7 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long, Optional ByV
If Trim(ws.Cells(i, 7).Value) = gValue And _
Trim(ws.Cells(i, 8).Value) = hValue And _
Trim(ws.Cells(i, 9).Value) = iValue Then
errorMsg = "GHIcombination already exists。"
errorMsg = "GHI columncombination already exists。"
ws.Cells(rowNum, 17).Value = errorMsg
Exit Sub
End If
@@ -408,7 +408,7 @@ Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long, Optional ByV
End Sub
' 按钮调用的宏Validate selected row
' Button macroValidate selected row
Sub validateDetailDataButton()
Dim rowNum As Long
rowNum = ActiveCell.Row
@@ -443,7 +443,7 @@ Sub ExportMasterDetailData()
savePath = savePath & ".csv"
End If
' Header: 利用区間コード,券種,コード,名称,1箇月運賃/販売額,定期額/券1(額)/利用額,定期支給期間/券1(枚)/特別料金,特別料金/券2(額),券2(枚),端数(額),特別料金
' Header:,1箇月運賃/販売額,定期額/券1(額)/利用額,定期支給期間/券1(枚)/特別料金,特別料金/券2(額),券2(枚),端数(額),特別料金
Dim headerList As Variant
headerList = Array("利用区間コード", "券種", "コード", "名称", "1箇月運賃/販売額", "定期額/券1(額)/利用額", "定期支給期間/券1(枚)/特別料金", "特別料金/券2(額)", "券2(枚)", "端数(額)", "特別料金")
@@ -461,9 +461,9 @@ Sub ExportMasterDetailData()
Dim r As Long
For r = 7 To lastDataRow
If Trim(ws.Cells(r, 3).Value) <> "" Then
' CSV col1 -> C
' CSV col1 -> C column
csvContent = csvContent & CleanCSVField(ws.Cells(r, 3).Value)
' CSV col2-11 -> G-P
' CSV col2-11 -> G-P column
For j = 7 To 16
csvContent = csvContent & "," & CleanCSVField(ws.Cells(r, j).Value)
Next j