Private Sub UserForm_Initialize() Dim i As Long With Worksheets("顧客マスタ") i = ActiveCell.Row Me.txtコード.Text = .Cells(i, 1) Me.txt漢字名称.Text = .Cells(i, 2) Me.txtカナ名称.Text = .Cells(i, 3) End With End Sub Private Sub btnOk_Click() Dim lastRow As Long With Worksheets("顧客マスタ") lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row + 1 .Cells(lastRow, 1) = Me.txtコード.Text .Cells(lastRow, 2) = Me.txt漢字名称.Text .Cel