The Mad Man
Gebruiker
- Lid geworden
- 15 aug 2007
- Berichten
- 16
Ik heb hier de volgende code:
Op deze manier gaat het nog een aantal keer door.
Omdat ik de handel wat efficiënter wil maken, wil ik hier een loop van maken.
Kan iemand laten zien hoe dat in dit geval moet? Ik kan wel een while- of een for loop maken, maar hier lukt het niet omdat er ook nog tekst bij staat.
Code:
If chk_Check1.Value = True Then
Selection.TypeText Text:=(chk_Check1.ControlTipText & vbNewLine)
If chk1a.Value = True Then
mroTemplate.AutoTextEntries("chk_Klant1").Insert Where _
:=Selection.Range, RichText:=True
End If
If chk1b.Value = True Then
mroTemplate.AutoTextEntries("chk_Klant2").Insert Where _
:=Selection.Range, RichText:=True
End If
If chk1c.Value = True Then
mroTemplate.AutoTextEntries("chk_Beide").Insert Where _
:=Selection.Range, RichText:=True
End If
End If
If chk_Check2.Value = True Then
Selection.TypeText Text:=(chk_Check2.ControlTipText & vbNewLine)
If chk2a.Value = True Then
mroTemplate.AutoTextEntries("chk_Klant1").Insert Where _
:=Selection.Range, RichText:=True
End If
If chk2b.Value = True Then
mroTemplate.AutoTextEntries("chk_Klant2").Insert Where _
:=Selection.Range, RichText:=True
End If
If chk2c.Value = True Then
mroTemplate.AutoTextEntries("chk_Beide").Insert Where _
:=Selection.Range, RichText:=True
End If
End If
Op deze manier gaat het nog een aantal keer door.
Omdat ik de handel wat efficiënter wil maken, wil ik hier een loop van maken.
Kan iemand laten zien hoe dat in dit geval moet? Ik kan wel een while- of een for loop maken, maar hier lukt het niet omdat er ook nog tekst bij staat.