shellToFile compile error (1 Viewer)

sammers101

Registered User.
Local time
Today, 06:35
Joined
May 11, 2012
Messages
89
I'm getting a compile error. I was trying to use ShellToFile for links in a table. Is there another way that allows users to click links that are part of a list?
Some items in the list have a link, others do not. They are different links.
I was using this code:
Code:
Private Sub cmdOpen_Click()

    If Not IsNull(Me.link) Then
        ShellToFile Me.link
    End If
    
End Sub

Thanks
 

Attachments

  • list[1].png
    list[1].png
    9.7 KB · Views: 383

theDBguy

I’m here to help
Staff member
Local time
Today, 03:35
Joined
Oct 29, 2018
Messages
21,358
Hi. To fix the error, you'll have to show us the code for ShellToFile. Otherwise, have you tried?

Code:
Application.FollowHyperlink Me.Link
 

sammers101

Registered User.
Local time
Today, 06:35
Joined
May 11, 2012
Messages
89
I used that before and switched to ShellToFile Me.link for some reason (can't remember now), but that appears to be working.
Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:35
Joined
Oct 29, 2018
Messages
21,358
I used that before and switched to ShellToFile Me.link for some reason (can't remember now), but that appears to be working.
Thanks
Well, yes, there are some potential drawbacks to using such a simpler approach. However, we can't help you fix the problem with ShellToFile if we can't see what it does. Is it the same thing as ShellExecute?
 

Users who are viewing this thread

Top Bottom