Ik zal wel ongelofelijk dom zijn, Warme Bakkertje.
Maar heb een avondje lopen *****n heb in de standaardmodule:
Dus ook alles voor de invoer van Beker Wedstrijden erbij, maar wat hij ook bij de competitie invoer doet, als ik in textbox 1 (hoort bij Speelminuten) een 1 invul dan vult hij deze voor alle criteria in (dus ook bij doelpunten, assists ed.) dit is een beetje vaag dus. Daarnaast wil de beker invoer niet in de juiste kolom terecht komen.. Doe ik zo iets ergs fout? De Competitie moet tussen de 23 en 49, de beker tussen 5 en 14, nacompetitie 60t/m 68 en oefen 72 t/m 84.
Zou u mij hier nog bij kunnen helpen?
En misschien nog antwoord kunnen geven op de scroll vraag?
Alvast super bedankt,
Marnix
Maar heb een avondje lopen *****n heb in de standaardmodule:
Code:
Sub Speelminuten()
Dim iCol As Long, data(28)
With Worksheets("Speelminuten")
'find first empty column in database
iCol = IIf(.Cells(6, 23) = "", 23, .Cells(32, 50).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(6, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Presentie()
Dim iCol As Long, data(28)
With Worksheets("Presentielijst Wedstrijden")
'find first empty column in database
iCol = IIf(.Cells(6, 23) = "", 23, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(6, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Geel()
Dim iCol As Long, data(28)
With Worksheets("Gele Kaarten")
'find first empty column in database
iCol = IIf(.Cells(10, 27) = "", 27, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Rood()
Dim iCol As Long, data(28)
With Worksheets("Rode Kaarten")
'find first empty column in database
iCol = IIf(.Cells(10, 27) = "", 27, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Kaarten()
Dim iCol As Long, data(28)
With Worksheets("Kaarten Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 27) = "", 27, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Assists()
Dim iCol As Long, data(28)
With Worksheets("Assists Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 27) = "", 27, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub Doelpunten()
Dim iCol As Long, data(28)
With Worksheets("Doelpunten Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 27) = "", 27, .Cells(32, 48).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulCompetitie("Textbox" & i + 1).Value = "", 0, InvulCompetitie("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub SpeelminutenBeker()
Dim iCol As Long, data(28)
With Worksheets("Speelminuten")
'find first empty column in database
iCol = IIf(.Cells(6, 33) = "", 23, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(6, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub PresentieBeker()
Dim iCol As Long, data(28)
With Worksheets("Presentielijst Wedstrijden")
'find first empty column in database
iCol = IIf(.Cells(6, 33) = "", 23, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(6, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub GeelBeker()
Dim iCol As Long, data(28)
With Worksheets("Gele Kaarten")
'find first empty column in database
iCol = IIf(.Cells(10, 37) = "", 27, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub RoodBeker()
Dim iCol As Long, data(28)
With Worksheets("Rode Kaarten")
'find first empty column in database
iCol = IIf(.Cells(10, 37) = "", 27, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub KaartenBeker()
Dim iCol As Long, data(28)
With Worksheets("Kaarten Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 37) = "", 27, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub AssistsBeker()
Dim iCol As Long, data(28)
With Worksheets("Assists Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 37) = "", 27, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Code:
Sub DoelpuntenBeker()
Dim iCol As Long, data(28)
With Worksheets("Doelpunten Overzicht")
'find first empty column in database
iCol = IIf(.Cells(10, 37) = "", 27, .Cells(5, 14).End(xlToLeft).Offset(, 1).Column)
'fill array with Textboxvalues
For i = 0 To 27
data(i) = IIf(InvulBeker("Textbox" & i + 1).Value = "", 0, InvulBeker("Textbox" & i + 1).Value)
Next
'copy the data to the database
.Cells(10, iCol).Resize(28) = WorksheetFunction.Transpose(data)
Application.Goto .Cells(1), True
End With
End Sub
Dus ook alles voor de invoer van Beker Wedstrijden erbij, maar wat hij ook bij de competitie invoer doet, als ik in textbox 1 (hoort bij Speelminuten) een 1 invul dan vult hij deze voor alle criteria in (dus ook bij doelpunten, assists ed.) dit is een beetje vaag dus. Daarnaast wil de beker invoer niet in de juiste kolom terecht komen.. Doe ik zo iets ergs fout? De Competitie moet tussen de 23 en 49, de beker tussen 5 en 14, nacompetitie 60t/m 68 en oefen 72 t/m 84.
Zou u mij hier nog bij kunnen helpen?
En misschien nog antwoord kunnen geven op de scroll vraag?
Alvast super bedankt,
Marnix
Laatst bewerkt door een moderator: