Question

I have a listbox in which the last field is a path to a file. It's data Type is Text. I'm trying to use the following to be able to open the path:

Private Sub DataView_DblClick(Cancel As Integer)
FollowHyperlink DataView.Column(8, DataView.ListIndex)
End Sub

I'm getting Run-Time error 94: Invalid use of Null.

I have this code,

Private Sub List36_DblClick(Cancel As Integer)
FollowHyperlink List36.Column(1, List36.ListIndex)
End Sub 

On the same form, and it works just fine, which is why I'm so confused.

I'm assuming there's some simple property that I have to change, but I can't find it. Any help would be great.

Was it helpful?

Solution

Counting starts at 0, not 1. I was indexing out of bounds

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top