Rename all macros to Z1_

This commit is contained in:
updsv7
2026-04-13 17:50:10 +09:00
parent 5272fa60dc
commit bd045a58ae

View File

@@ -1,10 +1,10 @@
Sub ClearRowData(ByVal ws As Worksheet, ByVal rowNum As Long) Sub Z1_ClearRowData(ByVal ws As Worksheet, ByVal rowNum As Long)
' Clear from D column onwards ' Clear from D column onwards
ws.Range(ws.Cells(rowNum, 4), ws.Cells(rowNum, 15)).ClearContents ws.Range(ws.Cells(rowNum, 4), ws.Cells(rowNum, 15)).ClearContents
ws.Cells(rowNum, 2).ClearContents ' Q column error info ws.Cells(rowNum, 2).ClearContents ' Q column error info
End Sub End Sub
Sub ImportMasterDetailData() Sub Z1_ImportMasterDetailData()
Dim filePath As String Dim filePath As String
Dim fileDialog As FileDialog Dim fileDialog As FileDialog
Dim wsTarget As Worksheet Dim wsTarget As Worksheet
@@ -119,7 +119,7 @@ NextLine:
MsgBox writeRow - 7 & " rows imported.", vbInformation MsgBox writeRow - 7 & " rows imported.", vbInformation
End Sub End Sub
Function CleanCSVField(ByVal field As Variant) As String Function Z1_CleanCSVField(ByVal field As Variant) As String
If IsEmpty(field) Or IsNull(field) Then If IsEmpty(field) Or IsNull(field) Then
CleanCSVField = "" CleanCSVField = ""
Exit Function Exit Function
@@ -137,7 +137,7 @@ Function CleanCSVField(ByVal field As Variant) As String
CleanCSVField = result CleanCSVField = result
End Function End Function
Sub validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long) Sub Z1_validateDetailData(ByVal ws As Worksheet, ByVal rowNum As Long)
' Check C column - must be 3-digit alphanumeric, required ' Check C column - must be 3-digit alphanumeric, required
Dim cValue As String Dim cValue As String
cValue = Trim(ws.Cells(rowNum, 3).Value) cValue = Trim(ws.Cells(rowNum, 3).Value)
@@ -234,7 +234,7 @@ End Sub
' Button macro (Validate selected row) ' Button macro (Validate selected row)
Sub validateDetailDataButton() Sub Z1_validateDetailDataButton()
Dim ws As Worksheet Dim ws As Worksheet
Dim lastRow As Long Dim lastRow As Long
Dim r As Long Dim r As Long
@@ -259,7 +259,7 @@ Sub validateDetailDataButton()
MsgBox "Validation complete. Errors: " & errorCount & ", ", vbInformation MsgBox "Validation complete. Errors: " & errorCount & ", ", vbInformation
End Sub End Sub
Sub ExportMasterDetailData() Sub Z1_ExportMasterDetailData()
Dim ws As Worksheet Dim ws As Worksheet
Set ws = ActiveSheet Set ws = ActiveSheet