using command button to open power point presentation

G

Guest

Hello All,

The following error occures when i use the wizard to open
a file with a command button on a form. "The expression
on click you entered as the event property setting
producded the following error:. * The expression may not
result in the name of a macro, the name of a user-defined
function, or [Event Procedure]. * There may have been an
error evaluating the function, event, or macro"

When I use the RunApp Action it will open the power point
application but not the file.

The code attached to the command button is below


Private Sub Command31_Click()
On Error GoTo Err_Command31_Click

Dim stAppName As String

stAppName = "T:\Collaboration\Current Collaboration
Presentation.ppt"
Call Shell(stAppName, 1)

Exit_Command31_Click:
Exit Sub

Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click


Thanks for any help given.

Ramone
 

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