Results 1 to 3 of 3
  1. #1
    Amras is offline Novice
    Windows 2K Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Sioux Falls, SD
    Posts
    29

    Application.FollowHyperlink causes runtime error 490 for some, but not others

    Good afternoon all; thanks for taking a moment to review my situation.



    I've got a very simple line of code that's causing an error for some users, but not others. The code is as follows:

    Code:
    Application.FollowHyperlink "C:\Users\" & Environ("USERNAME") & "\Documents\Contact List 06-09.xlsx", , True
    The error they're getting is runtime error 490, cannot open the specified file.

    Two things are confusing me. 1) The document exists. Of that there's no question. 2) The code works for the majority of my users, but not for a very select few.

    Any suggestions, folks?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Possibly some network permission issues?

    Review:

    http://allenbrowne.com/func-GoHyperlink.html

    However, Allen still uses FollowHyperlink in that code.

    I recently tried FollowHyperlink to open PDF files. It wasn't working so went with Shell alternative.

    Private Sub btnLink_Click()
    On Error GoTo ErrProc
    'FollowHyperlink is not working properly
    ''Application.FollowHyperlink strPath
    Dim wsShell As Object
    Set wsShell = CreateObject("WScript.Shell")
    wsShell.Run Chr(34) & Me.tbxLink & Chr(34)
    ExitProc:
    Exit Sub
    ErrProc:
    MsgBox "Cannot open document. Contact database administrator. : " & Err.Number
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps some of your users created a profile on the local machine and also on the network. In other words, there is a folder that is named MyName as well as MyName.Domain in the Users folder on the machine.

    I would check the machines where the trouble is occurring. Check the users folder and look for two profiles (folders).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Application.FollowHyperlink throwing Exception
    By Mnelson in forum Programming
    Replies: 4
    Last Post: 03-19-2015, 02:13 PM
  2. Replies: 4
    Last Post: 01-27-2015, 03:41 AM
  3. Installing 2010 Runtime Developer Application
    By crowegreg in forum Access
    Replies: 3
    Last Post: 12-24-2012, 03:24 PM
  4. Reference is not valid FollowHyperlink error
    By kevint_cnc in forum Access
    Replies: 2
    Last Post: 09-04-2012, 02:22 AM
  5. Replies: 13
    Last Post: 06-12-2012, 09:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums