Open a file

  • Thread starter Thread starter Jaz
  • Start date Start date
J

Jaz

I'm trying to create a button that will open a file in access 2000.

The location of the file is D:\Test\label.xff.

If I run this in the command prompt, it opens the file with no problems.

If I create an event on a button to open the file I get an error. The VB
code is this:

Private Sub RunForms_Click()
Dim RetVal
RetVal = Shell("D:\Test\label.xff", 1)
End Sub

Why won't this work if it works in the command prompt?

Thanks,
Jasper
 
For the benefit of others reading this, I answered this elsewhere.

The answer is to use FollowHyperlink instead.
 
Back
Top