diamondo
Gebruiker
- Lid geworden
- 8 sep 2006
- Berichten
- 129
ik heb een script:
de code:
moet het zo doen:
als de colom met de ingevoerde text al bestaad dat ie het overscrijft
MAAR... ik kom er niet uit.
help mij HelpMij.nl !
diamondo
(benniet goed in scripten en verhalen te verzinnen
)
Code:
Private Sub cmdToevoegen_Click()
Dim strN As String
Dim strL As String
Dim strK As String
Dim strC As String
strN = txtNaam.Text
strL = cmbGroep.Text
strK = cmbHuiswerkMee.Text
strK2 = cmbHuiswerkMee2.Text
strK3 = cmbHuiswerkMee3.Text
strK4 = cmbHuiswerkMee4.Text
strK5 = cmbHuiswerkMee5.Text
strK6 = cmbHuiswerkMee6.Text
strK7 = cmbHuiswerkMee7.Text
strK8 = cmbHuiswerkMee8.Text
strK9 = cmbHuiswerkMee9.Text
strK10 = cmbHuiswerkMee10.Text
strC = cmbCijfer.Text
[B][I]If strN = AlreadyExits Then[/I][/B] 'zoeken of strN al bestaad
Range("A25").Select 'begin database
Selection.End(xlDown).Select
Selection.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = strN
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strL
Selection.Offset(0, 1).Select
If optM.Value = True Then
ActiveCell.FormulaR1C1 = "Man"
Else
ActiveCell.FormulaR1C1 = "Vrouw"
End If
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK2
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK3
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK4
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK5
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK6
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK7
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK8
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK9
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strK10
Selection.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = strC
txtNaam.Text = "Naam"
optM.Value = True
End Sub
de code:
Code:
If strN = AlreadyExits Then
als de colom met de ingevoerde text al bestaad dat ie het overscrijft
MAAR... ik kom er niet uit.

help mij HelpMij.nl !
diamondo
(benniet goed in scripten en verhalen te verzinnen
