hallo,
ik heb voor men werk, een excel gemaakt waar ik bijhoud, wie welk machine mee heeft en wanneer deze terug op het magazijn is.
ik gebruik hiervoor een checkbox die ik aanvink als het toestel terug is, deze voegt dan automatisch de datum toe in de andere cel.
in VB is dit wel heel chaotisch.
kan dit korter of anders gedaan worden ?
bijgevoegd het vb script en bestandje.
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox1.TopLeftCell.Offset(0, 1).Value = Date
Else
CheckBox1.TopLeftCell.Offset(0, 1).Value = vbNullString
End If
End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then
CheckBox1.TopLeftCell.Offset(1, 1).Value = Date
Else
CheckBox1.TopLeftCell.Offset(1, 1).Value = vbNullString
End If
End Sub
Private Sub CheckBox3_Click()
If CheckBox3.Value = True Then
CheckBox1.TopLeftCell.Offset(2, 1).Value = Date
Else
CheckBox1.TopLeftCell.Offset(2, 1).Value = vbNullString
End If
End Sub
Private Sub CheckBox4_Click()
If CheckBox4.Value = True Then
CheckBox1.TopLeftCell.Offset(3, 1).Value = Date
Else
CheckBox1.TopLeftCell.Offset(3, 1).Value = vbNullString
End If
End Sub
enzo verder voor 100+ toestellen.
bestand is te groot om te uploaden.
alvast bedankt!
groeten,
michael