F
Fran
Hi people
I've just tried to run the following code
Private Sub_Form_Load()
With lstMonth
..AddItem "January"
..AddItem "February"
..AddItem "March"
..AddItem "April"
..AddItem "May"
..AddItem "June"
..AddItem "July"
..AddItem "August"
..AddItem "September"
..AddItem "October"
..AddItem "November"
..AddItem "December"
End With
End Sub
In an attempt to add items to a list box named "lstMonth".
When I try to run the procedure, I get "invalid outside procedure" as
the message. Can anyone suggest what I'm doing wrong, or is this some
sort of strange run time error?
The curious thing is that when I ran a test as follows:
Private Sub_Form_Load()
lstNames.AddItem "Joe Bloggs"
End Sub
for a list box named "lstNames" it works fine.
Any ideas what is going on?
Fran
I've just tried to run the following code
Private Sub_Form_Load()
With lstMonth
..AddItem "January"
..AddItem "February"
..AddItem "March"
..AddItem "April"
..AddItem "May"
..AddItem "June"
..AddItem "July"
..AddItem "August"
..AddItem "September"
..AddItem "October"
..AddItem "November"
..AddItem "December"
End With
End Sub
In an attempt to add items to a list box named "lstMonth".
When I try to run the procedure, I get "invalid outside procedure" as
the message. Can anyone suggest what I'm doing wrong, or is this some
sort of strange run time error?
The curious thing is that when I ran a test as follows:
Private Sub_Form_Load()
lstNames.AddItem "Joe Bloggs"
End Sub
for a list box named "lstNames" it works fine.
Any ideas what is going on?
Fran