From 422e8c5934b60a66d694835d53aaa23a13ac0041 Mon Sep 17 00:00:00 2001 From: updsv7 Date: Mon, 13 Apr 2026 14:53:23 +0900 Subject: [PATCH] Rollback to 6a65a45 --- vba_code_kukan_detail_master.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/vba_code_kukan_detail_master.txt b/vba_code_kukan_detail_master.txt index 2515a33..c39fc75 100644 --- a/vba_code_kukan_detail_master.txt +++ b/vba_code_kukan_detail_master.txt @@ -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