I have created a small program, one window, 3 pushbuttons, a listbox and label. When the program compiles I get the message ‘There is more than one item with this name and it’s not clear to which this refers.’ So I changed the item name and got the same message. It was a public item so I changed it to private but still got the same message.
Can someone help?
I’m using 2017r1 on Windows 10.
Please post the line that generates the error.
Since you mention listbox, one common cause of that error is using AddRow with incorrect parameters.
That message usually means you have a method that takes parameters and you are calling that method with the wrong variable types.
If dbfile.Exists Then
For Each c As FolderItem In dbfile
LB1.addrow = c.name
LB1.addrow is highlighted.
On the previous line I get the message ‘This object does not implement the iterable interface and cannot be used in a For Each Loop’
You could also write it
if it makes it easier to envision that as a function call instead of an assignment. The parentheses are optional in a function call.
Thanks guys, I also looked at one of the examples and I understand it a lot beter now.