Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Privacywetgeving
Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.
Heb je nog een aantal dingen die automatisch moeten? Nu zeggen, want straks hou ik het voor gezien. Moet leuk blijven. Het is onderhand een professioneel tooltje geworden
Zo waren er wel meer van die dingen...![]()
Option Explicit
Private Sub Combo1_Click()
If Combo1.ListIndex >= 0 Then VulCombo2
End Sub
Private Sub Combo1_Enter()
Combo2.Clear
List1.Clear
Combo1.DropDown
End Sub
Private Sub Combo2_Click()
If Combo2.ListIndex >= 0 Then VulList1
End Sub
Private Sub Combo2_Enter()
List1.Clear
Combo2.DropDown
End Sub
Private Sub UserForm_Activate()
Combo1.SetFocus
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer
Dim j As Integer
Dim r As String
Dim s As String
With ActiveWorkbook.Sheets(1)
For i = 2 To .Cells(1, 1).CurrentRegion.Rows.Count
s = .Cells(i, 1).Value
If InStr(r, s) = 0 Then
For j = 0 To Combo1.ListCount - 1
If s < Combo1.List(j) Then Exit For
Next
Combo1.AddItem s, j
r = r & s & "\"
End If
Next
End With
List1.SetFocus
End Sub
Private Sub VulCombo2()
Dim i As Integer
Dim j As Integer
Dim s As String
With ActiveWorkbook.Sheets(1)
Combo2.Clear
For i = 2 To .Cells(1, 1).CurrentRegion.Rows.Count
s = .Cells(i, 1).Value
If s = Combo1.Text Then
s = .Cells(i, 2).Value
For j = 0 To Combo2.ListCount - 1
If s < Combo2.List(j) Then Exit For
Next
Combo2.AddItem s, j
End If
Next
End With
Combo2.SetFocus
End Sub
Private Sub VulList1()
Dim a() As String
Dim i As Integer
Dim j As Integer
Dim m As Integer
Dim n As Integer
With ActiveWorkbook.Sheets(1)
m = .Cells(1, 1).CurrentRegion.Rows.Count
n = -1
ReDim a(3, m)
For i = 2 To m
If .Cells(i, 1).Value = Combo1.Text Then
n = n + 1
a(0, n) = .Cells(i, 3)
a(1, n) = .Cells(i, 4)
a(2, n) = .Cells(i, 5)
a(3, n) = .Cells(i, 6)
End If
Next
End With
ReDim Preserve a(3, n)
List1.Column() = a
List1.SetFocus
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.