for each error
The same code works to populate another list box. Why am I getting this
error?
The difference is the "Option Explicit" statement which requires all
variables to be declared.
Try:
Option Explicit
Private Sub UserForm_Activate()
Dim cell As Range
For Each cell In Range("cpName")
If cell.Value < "" Then
lstMnemonic.AddItem cell.Value
End If
Next cell
End Sub
Regards,
KL
|