Open a file

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
 
D

Douglas J. Steele

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

The answer is to use FollowHyperlink instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top