Hi i have a listbox "mylistbox"which takes file names as values.i want when i double click on the listbox, to open the file.As i read in the thread702-336241 i had to make a label called "myhyperlink "and at the double click event of the "mylistbox" i had to enter this code:
Private Sub MyListBox_DblClick(Cancel As Integer)
MyHyperlink.HyperlinkAddress = "C:\Program Files\diet\diets\express" & MyListBox
MyHyperlink.Hyperlink.Follow
End Sub
because the files i'm trying to open are in that path.
Now when im trying to run that i have runtime error '2455' and i have a yellow mark at the line MyHyperlink.HyperlinkAddress
why is that?what is wrong.I use access xp.at the thread702-336241 sais that it works fine.why not here?
please help me
Private Sub MyListBox_DblClick(Cancel As Integer)
MyHyperlink.HyperlinkAddress = "C:\Program Files\diet\diets\express" & MyListBox
MyHyperlink.Hyperlink.Follow
End Sub
because the files i'm trying to open are in that path.
Now when im trying to run that i have runtime error '2455' and i have a yellow mark at the line MyHyperlink.HyperlinkAddress
why is that?what is wrong.I use access xp.at the thread702-336241 sais that it works fine.why not here?
please help me