Hi All,
I just would like to know why my code isn't working. Here is my VBA code:
Thanks in advance.
Kind regards,
Ian
I just would like to know why my code isn't working. Here is my VBA code:
VBA Code:
Private Sub OKButton_Click()
Dim i As Integer
'Make Sheet1 active
Estimates.Active
For i = 10 To 19
If DataCheckBox1.Value = True Then Cells(i, 2).Value = DateCheckBox1.Caption
If DataCheckBox2.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox2.Caption
If DataCheckBox3.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox3.Caption
If DataCheckBox4.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox4.Caption
If DataCheckBox5.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox5.Caption
If DataCheckBox6.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox6.Caption
If DataCheckBox7.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox7.Caption
If DataCheckBox8.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox8.Caption
If DataCheckBox9.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox9.Caption
If DataCheckBox10.Value = True Then Cells(i, 2).Value = Cells(i, 2).Value & " " & DateCheckBox10.Caption
End Sub
Private Sub ClearButton_Click()
Call UserForm_Initialize
End Sub
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub CommandButton1_Click()
End Sub
Private Sub UserForm_Initialize()
'Uncheck DataCheckBoxes
DateCheckBox1.Value = False
DateCheckBox2.Value = False
DateCheckBox3.Value = False
End Sub
Thanks in advance.
Kind regards,
Ian