Makis Kahrimanidis
Makis Kahrimanidis

Reputation: 93

Userforms causing excel 2013 to crash

I have the following issue:

I create a userform in excel 2013 and add for starters one text box to show the date and right underneath a combobox which is reflecting a data validation list.

As soon as i write the code

Private Sub UserForm_Initialize()
Me.tbDate = Date

'fill combobox
For Each cell In [cartridges]
    Me.cmbCartridges.AddItem cell
Next cell

End Sub

Can anyone help pretty please?

Thanks in advance

Upvotes: 1

Views: 220

Answers (1)

Excel Hero
Excel Hero

Reputation: 14764

The code should work. I am running Excel 2013 as well and just tested your code with no problems.

Two things to check.

1

Make sure that the defined name is spelled exactly the same way in the VBA code as it is in the Name Manger.

2

Make sure that the defined name does not evaluate to an error.

Upvotes: 1

Related Questions