Hi all,
Im using this multipage on my forum.
I got 5 pages
Each page looks exact the same and is used to register mistakes.
Each page contains several checkboxes.
For example; chbCorrectby
Now due to ambiguous name restriction they are alle called differently; chbCorrectby1, chbCorrectby2, chbCorrectby3
The number corresponds with the page number.
Now my question;
Do i need to make code eacht time 5 times; see example below;
Or is there an easier / nicer way?
As said it's not only 1 checkbox, got more of them so the code below i have to do lot of times for the other checkboxes
Im using this multipage on my forum.
I got 5 pages
Each page looks exact the same and is used to register mistakes.
Each page contains several checkboxes.
For example; chbCorrectby
Now due to ambiguous name restriction they are alle called differently; chbCorrectby1, chbCorrectby2, chbCorrectby3
The number corresponds with the page number.
Now my question;
Do i need to make code eacht time 5 times; see example below;
Or is there an easier / nicer way?
As said it's not only 1 checkbox, got more of them so the code below i have to do lot of times for the other checkboxes
VBA Code:
rivate Sub chbCorrectby_Click()
If chbCorrectby.Value = True Then
txtCorrectBy.Value = "N/A"
Else
txtCorrectBy.Value = ""
End If
End Sub
Private Sub chbCorrectby2_Click()
If chbCorrectby2.Value = True Then
txtCorrectBy2.Value = "N/A"
Else
txtCorrectBy2.Value = ""
End If
End Sub
Private Sub chbCorrectby3_Click()
If chbCorrectby3.Value = True Then
txtCorrectBy3.Value = "N/A"
Else
txtCorrectBy3.Value = ""
End If
End Sub
Private Sub chbCorrectby4_Click()
If chbCorrectby4.Value = True Then
txtCorrectBy4.Value = "N/A"
Else
txtCorrectBy4.Value = ""
End If
End Sub
Private Sub chbCorrectby5_Click()
If chbCorrectby5.Value = True Then
txtCorrectBy5.Value = "N/A"
Else
txtCorrectBy5.Value = ""
End If
End Sub