marcvanderpeet12
Member
Dear all,
Im working on a macro to type in certain information in a sheet by input boxes (see code below). Thing is that a want the macro to fill in the data below the last record. So the first it should insert info in a1, b1, c1 and next time in a2, b2, c2 etc…
Can anybody tell me how I can achieve this in VBA?
Thanks!
Regards,
Marc
Sub kaarten()
'macro om kaarten in te voeren en dan te laten berekenen wat je voor kansen je hebt tegen een bepaalde range
Dim inputkaarten As String
Dim range As Integer
Dim outputkaarten As String
Set ws = Worksheets("Blad1")
inputkaarten = InputBox("Voer hier je kaarten in")
ws.Cells(2, 4) = inputkaarten
range = InputBox("Voer hier de geschatte range van je tegenstander in")
ws.Cells(2, 5) = range
outputkaarten = ws.Cells(2, 6)
MsgBox (outputkaarten)
End Sub
Im working on a macro to type in certain information in a sheet by input boxes (see code below). Thing is that a want the macro to fill in the data below the last record. So the first it should insert info in a1, b1, c1 and next time in a2, b2, c2 etc…
Can anybody tell me how I can achieve this in VBA?
Thanks!
Regards,
Marc
Sub kaarten()
'macro om kaarten in te voeren en dan te laten berekenen wat je voor kansen je hebt tegen een bepaalde range
Dim inputkaarten As String
Dim range As Integer
Dim outputkaarten As String
Set ws = Worksheets("Blad1")
inputkaarten = InputBox("Voer hier je kaarten in")
ws.Cells(2, 4) = inputkaarten
range = InputBox("Voer hier de geschatte range van je tegenstander in")
ws.Cells(2, 5) = range
outputkaarten = ws.Cells(2, 6)
MsgBox (outputkaarten)
End Sub