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.
.Range.Cells(ComboBox1.ListIndex + 2, 42).Resize(, 2) = Array(CbxVent1.Value, CbxVent2.Value)
End With
If TbxHoogte = "" Then
MsgBox ("Hoogte van de ruimte is niet ingevuld! Vul altijd minimaal waarde 0 in!")
Exit Sub
End If
If TbxGO = "" Then
MsgBox ("De gebruiksoppervlakte is niet ingevuld! Vul altijd minimaal waarde 0 in of vul de lengte- en breedtematen in!")
Exit Sub
End If
With Sheets("AutoCAD Data")
.Cells(ComboBox1.ListIndex + 2, 2) = TbxBouwLaag.Value
.Cells(ComboBox1.ListIndex + 2, 4) = CbxGebruiksfunctie.Value
.Cells(ComboBox1.ListIndex + 2, 6) = CDbl(TbxHoogte.Value)
.Cells(ComboBox1.ListIndex + 2, 5) = CDbl(TbxGO.Value)
.Cells(ComboBox1.ListIndex + 2, 14) = TbxLengte.Value
.Cells(ComboBox1.ListIndex + 2, 15) = TbxBreedte.Value
'.Cells(ComboBox1.ListIndex + 2, 14).Resize(, 2) = Array(CDbl(TbxLengte.Value), CDbl(TbxBreedte.Value))
End With
If Selection.Address = ActiveCell.EntireRow.Address Then frmCreate.Show
Private Sub UserForm_Initialize()
Dim sv, i As Long
sv = Sheets("verlichting").listobjects(1).DataBodyRange.Value
Set dic = CreateObject("scripting.dictionary")
For i = 1 To UBound(sv)
If Not dic.exists(sv(i, 1)) Then dic.Item(sv(i, 1)) = Array(sv(i, 1), CreateObject("scripting.dictionary"))
dic(sv(i, 1))(1).Item(sv(i, 2)) = Array(Application.index(sv, i, 3), i)
Next i
CbxSoort1.List = dic.keys ' Verlichting1
CbxSoort2.List = CbxSoort1.List ' Verlichting2
CbxSoort3.List = CbxSoort1.List ' Verlichting3
ComboBox1.List = Sheets("Algemeen").listobjects("tabel2").DataBodyRange.Value
CbxGebouwdeel.List = [row(1:6)] 'Gebouwdeel
CbxEnergiesector.List = [row(1:6)] 'Energiesector
' Regeling
CbxRegeling1.List = Split("Accentverlichting|Centraal aan/uit|Daglicht|Veegpuls|Veegpuls icm daglicht|Vertrek|Vertrek met scheiding dagl/kunstl", "|")
CbxRegeling2.List = CbxRegeling1.List
CbxRegeling3.List = CbxRegeling1.List
' Detectie
CbxDetectie1.List = Split("Aanwezig|Geen", "|")
CbxDetectie2.List = CbxDetectie1.List
CbxDetectie3.List = CbxDetectie1.List
' Ventilatie
CbxVent1.List = Split("Mechanische afzuiging|Mechanische balans|Mechanische toevoer|Natuurlijke ventilatie", "|")
CbxVent2.List = CbxVent1.List
' Gebruiksfunctie
CbxGebruiksfunctie.List = Split("Bijeenkomst|Bijeenkomst met alcohol|Gezondheidszorg (klinisch)|Gezondheidszorg (niet klinisch)|Hulpfunctie|Industrie|Kantoor|Logies|Niet -labelplichtig|Onderwijs|Overig|Sport (anders)|Sport (matig verwarmd)|Winkel|Wonen", "|")
' Agezogen
CbxAfgezogen1.List = Split("JA|NEE", "|")
CbxAfgezogen2.List = CbxAfgezogen1.List
CbxAfgezogen3.List = CbxAfgezogen1.List
TbxEVSA2.Visible = ChbVerl2
TbxEVSA3.Visible = ChbVerl3
If Target.Columns.Count > listobjects("tabel2").ListColumns.Count Then frmCreate.Show
'If Selection.Address = ActiveCell.EntireRow.Address Then ComboBox1 = Cells(ActiveCell.Row, 2).Value
CheckRuimtenr
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'If Selection.Address = ActiveCell.EntireRow.Address Then frmCreate.Show
If Target.Columns.Count > listobjects("tabel2").ListColumns.Count Then frmCreate.Show
'End If
End Sub
Een andere vraag.
ik wil een restrictie inbouwen door alleen in "tabel2" de Userform te tonen indien de hele rij wordt geselecteerd.
Code:, [/QUOTE] Begrijp je het zelf nog?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Target.EntireRow.Address And Not Intersect(Target, ListObjects("tabel2").Range) Is Nothing Then frmCreate.Show
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.