diff --git a/vba_code_kotsu_master.txt b/vba_code_kotsu_master.txt index 452f5dc..dc047f8 100644 --- a/vba_code_kotsu_master.txt +++ b/vba_code_kotsu_master.txt @@ -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 ws.Range(ws.Cells(rowNum, 4), ws.Cells(rowNum, 15)).ClearContents ws.Cells(rowNum, 2).ClearContents ' Q column error info End Sub -Sub ImportMasterDetailData() +Sub Z1_ImportMasterDetailData() Dim filePath As String Dim fileDialog As FileDialog Dim wsTarget As Worksheet @@ -119,7 +119,7 @@ NextLine: MsgBox writeRow - 7 & " rows imported.", vbInformation 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 CleanCSVField = "" Exit Function @@ -137,7 +137,7 @@ Function CleanCSVField(ByVal field As Variant) As String CleanCSVField = result 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 Dim cValue As String cValue = Trim(ws.Cells(rowNum, 3).Value) @@ -234,7 +234,7 @@ End Sub ' Button macro (Validate selected row) -Sub validateDetailDataButton() +Sub Z1_validateDetailDataButton() Dim ws As Worksheet Dim lastRow As Long Dim r As Long @@ -259,7 +259,7 @@ Sub validateDetailDataButton() MsgBox "Validation complete. Errors: " & errorCount & ", ", vbInformation End Sub -Sub ExportMasterDetailData() +Sub Z1_ExportMasterDetailData() Dim ws As Worksheet Set ws = ActiveSheet