This commit is contained in:
updsv7
2026-04-13 14:53:23 +09:00
parent 5f76d90851
commit 422e8c5934

View File

@@ -368,15 +368,8 @@ Sub ExportMasterDetailData()
Dim ws As Worksheet
Set ws = ActiveSheet
' Find actual last row with data
Dim lastDataRow As Long
Dim r As Long
lastDataRow = 6
For r = 7 To 10000
If Trim(ws.Cells(r, 3).Value) <> "" Then
lastDataRow = r
End If
Next r
lastDataRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row
If lastDataRow < 7 Then
MsgBox "No data rows to output.", vbExclamation