wl_tinus
05-10-2006, 04:23 AM
Hi there,
I'm quite a newbie to VBA for Word and Excel.
I'm developing a wizard for Wordt that fills out a document with data from a userform. To make it foolproof I need to add te code below to my userform. However I need to enter it about 20ish times. And only the last nuber changes from 1 to 20, including the last number in the sub title. Is there any way to make these 20 subs more compact, or to make it one sub?
Kind Regards,
Martijn
Private Sub F1Chk1_Click()
If F1Chk1.Value = False Then
FEuri1.BackColor = &H80000004
FEuri1.Enabled = False
FEuri1.Tag = ""
Else
FEuri1.BackColor = &H80000005
FEuri1.Enabled = True
FEuri1.Tag = "Save"
End If
End Sub
I'm quite a newbie to VBA for Word and Excel.
I'm developing a wizard for Wordt that fills out a document with data from a userform. To make it foolproof I need to add te code below to my userform. However I need to enter it about 20ish times. And only the last nuber changes from 1 to 20, including the last number in the sub title. Is there any way to make these 20 subs more compact, or to make it one sub?
Kind Regards,
Martijn
Private Sub F1Chk1_Click()
If F1Chk1.Value = False Then
FEuri1.BackColor = &H80000004
FEuri1.Enabled = False
FEuri1.Tag = ""
Else
FEuri1.BackColor = &H80000005
FEuri1.Enabled = True
FEuri1.Tag = "Save"
End If
End Sub