R
RobEdgeler
Hi. Any help appreciated on this one will be gratefully received. I'm
no expert in this as I'm just an end user with a desire to make things
better but I always try to have a go at solving it all myself, but I
get stuck...easily!
I have a spreadsheet that contains a list of staff names in the various
rows. In the columns, I have tasks that they should have completed as
part of their training. The UserForm allows the clerk to check the
boxes for each appropriate task. I want the check box to be converted
to a value of "X" if True and then for this "X" to be put in the
worksheet in the appropriate column to highlight that the activity has
been completed. There are about 60 of these CheckBox controls (split
over 3 pages on the MultiPage form).
I have this so far:
Dim myBox As Control
Dim myValue As Long
myValue = 0
For Each myBox In Me.MultiPage1.Pages *** ???? Not correct I think.
If TypeOf myBox Is MSForms.CheckBox Then
myValue = myValue + 1
If myBox.Value = True Then
Sheets("Colleague Details").Select
Range("C3").Select
Selection.End(xlDown).Select *** This is the address of the
cell that contains the name of the staff member, always the last one
entered in the list
*** Here I need to be able to calculate the address of this
cell dynamically and offset to the relevant column to enter "X". So
for example, if CheckBox 6 is True, Column F on the worksheet should
have an "X" in the appropriate row as should Column Z if CheckBox 26 is
True. If these are the only two CheckBox controls selected, the other
columns should have nothing in them.
ActiveCell.Value = "X"
Exit For
End If
End If
Next myBox
End Sub
I'd be so grateful if I could get help with this.
Thanks in advance,
Rob.

no expert in this as I'm just an end user with a desire to make things
better but I always try to have a go at solving it all myself, but I
get stuck...easily!

I have a spreadsheet that contains a list of staff names in the various
rows. In the columns, I have tasks that they should have completed as
part of their training. The UserForm allows the clerk to check the
boxes for each appropriate task. I want the check box to be converted
to a value of "X" if True and then for this "X" to be put in the
worksheet in the appropriate column to highlight that the activity has
been completed. There are about 60 of these CheckBox controls (split
over 3 pages on the MultiPage form).
I have this so far:
Dim myBox As Control
Dim myValue As Long
myValue = 0
For Each myBox In Me.MultiPage1.Pages *** ???? Not correct I think.
If TypeOf myBox Is MSForms.CheckBox Then
myValue = myValue + 1
If myBox.Value = True Then
Sheets("Colleague Details").Select
Range("C3").Select
Selection.End(xlDown).Select *** This is the address of the
cell that contains the name of the staff member, always the last one
entered in the list
*** Here I need to be able to calculate the address of this
cell dynamically and offset to the relevant column to enter "X". So
for example, if CheckBox 6 is True, Column F on the worksheet should
have an "X" in the appropriate row as should Column Z if CheckBox 26 is
True. If these are the only two CheckBox controls selected, the other
columns should have nothing in them.
ActiveCell.Value = "X"
Exit For
End If
End If
Next myBox
End Sub
I'd be so grateful if I could get help with this.
Thanks in advance,
Rob.


