これを試してみてください:
Enum columnNumbers
colDate = 1
colCompany
colProduct
End Enum
Private Sub CommandButton1_Click()
Dim nextRow As Integer
Dim ws As Worksheet
Set ws = ActiveSheet
nextRow = ws.Cells(ws.Rows.Count, colDate).End(xlUp).Row + 1
ws.Cells(nextRow, colDate) = InputBox("Enter date value", "Date", Date)
ws.Cells(nextRow, colCompany) = InputBox("Enter company name", "Company")
ws.Cells(nextRow, colProduct) = InputBox("Enter product details", "Product")
End Sub
をあなたの3つの列が連続していると仮定すると、最初の列挙値に列番号を割り当てる(例えば、日付列はE、設定colDate = 5の場合)と列挙、その後変数は自動的に1つインクリメントされます(colCompany = colDate + 1など)。
次に入力ボックスを使用して値をキャプチャします。
新しいSOのメンバーとして、私はこのセクションを通してください[MCVE] – swiftBoy