DB73
Board Regular
- Joined
- Jun 7, 2022
- Messages
- 107
- Office Version
- 365
- 2021
- 2019
- 2016
- 2010
- 2007
- Platform
- Windows
- Mobile
- Web
Hey guys,
another problem to solve for me
i have a sheet with some buttons, 1 is for showing my userform (MyForm)
Code to show userform;
this 1 is on sheet18(gegevens invoer)
This 1 is on the userform;
Code to load the cmbxs;
on my search on the WWW i found that it could be a UserForm_Initialize() that causes the problem.
so i skipped items on the UserForm_Initialize() part to look which line causes the problem, but i cant figur out which one.
if i remove the whole code it seems to work and the userform pops up but, without the comboboxes population
any help on this one will be apreciate
another problem to solve for me
i have a sheet with some buttons, 1 is for showing my userform (MyForm)
Code to show userform;
VBA Code:
Private Sub CommandButton1_Click()
MyForm.Show
End Sub
This 1 is on the userform;
Code to load the cmbxs;
VBA Code:
Private Sub UserForm_Initialize()
ComboBox1.List = Application.Range("werkdag_ziek_verlof").value
ComboBox2.List = Application.Range("projecten").value
ComboBox3.List = Application.Range("adressen").value
ComboBox4.List = Application.Range("normale_uren_over_uren").value
'ComboBox5.List = Application.Range("uur_tarief_percentage").value
'cbx5
Dim cell As Range
For Each cell In Application.Range("uur_tarief_percentage").Cells
ComboBox5.AddItem cell.Text
Next cell
ComboBox6.List = Application.Range("werktijden").value
ComboBox7.List = Application.Range("werktijden").value
ComboBox8.List = Application.Range("pauze_geen_pauze").value
ComboBox9.List = Application.Range("BTW_verlegd").value
'ComboBox10.List = Application.Range("BTW_heffing").value
'cbx10
For Each cell In Application.Range("btw_heffing").Cells
ComboBox10.AddItem cell.Text
Next cell
'ComboBox11.List = Application.Range("adressen[klantnaam]").value
'ComboBox11
With ComboBox11
.ColumnCount = 5
.List = Range("adressen").value
End With
ComboBox12.List = Application.Range("adressen[klantnaam]").value
ComboBox13.List = Application.Range("enkel_retour_rit").value
ComboBox14.List = Application.Range("woon_werk_zakelijk").value
ComboBox15.List = Application.Range("te_declareren_per_km").value
ComboBox16.List = Application.Range("overige_declaratie").value
ComboBox17.List = Application.Range("reden_rit").value
ComboBox18.List = Application.Range("te_declareren_per_km").value
ComboBox19.List = Application.Range("vervoer").value
ComboBox20.List = Application.Range("reden_overige_declaratie").value
End Sub
on my search on the WWW i found that it could be a UserForm_Initialize() that causes the problem.
so i skipped items on the UserForm_Initialize() part to look which line causes the problem, but i cant figur out which one.
if i remove the whole code it seems to work and the userform pops up but, without the comboboxes population
any help on this one will be apreciate