By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,948 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,948 IT Pros & Developers. It's quick & easy.

Powerpoint from Access problem...any ideas?

P: n/a
I am trying to just create a simple Access form with buttons that will pop
up different powerpoint presentations but recieve an 'Invalid procedure call
or arguement' error when I try to run the ppt. Any ideas? Running both
Access and PPT 2000.

Here's the code I have:

Private Sub cmdTest_Click()
On Error GoTo Err_cmdTest_Click

Dim stAppName As String

stAppName = "C:\WINNT\Profiles\Desktop\AccessTest.ppt"
Call Shell(stAppName, 0)

Exit_cmdTest_Click:
Exit Sub

Err_cmdTest_Click:
MsgBox Err.Description
Resume Exit_cmdTest_Click

End Sub

Thanks in advance...
Matt

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can't Shell to the file itself. You need to either include the full path
to the Powerpoint executable, or you could use ShellExecute (see
http://www.mvps.org/access/api/api0018.htm at "The Access Web" for code to
do this)

You may also be able to use Call Shell("Start " & Chr$(34) & stAppName &
Chr$(34), 0)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Wilson" <wi****@kingofprussia.com> wrote in message
news:WK******************@fe37.usenetserver.com...
I am trying to just create a simple Access form with buttons that will pop
up different powerpoint presentations but recieve an 'Invalid procedure call or arguement' error when I try to run the ppt. Any ideas? Running both
Access and PPT 2000.

Here's the code I have:

Private Sub cmdTest_Click()
On Error GoTo Err_cmdTest_Click

Dim stAppName As String

stAppName = "C:\WINNT\Profiles\Desktop\AccessTest.ppt"
Call Shell(stAppName, 0)

Exit_cmdTest_Click:
Exit Sub

Err_cmdTest_Click:
MsgBox Err.Description
Resume Exit_cmdTest_Click

End Sub

Thanks in advance...
Matt

Nov 13 '05 #2

P: n/a
I'll give it a try...thanks!

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:F%********************@twister01.bloor.is.net .cable.rogers.com...
You can't Shell to the file itself. You need to either include the full path to the Powerpoint executable, or you could use ShellExecute (see
http://www.mvps.org/access/api/api0018.htm at "The Access Web" for code to
do this)

You may also be able to use Call Shell("Start " & Chr$(34) & stAppName &
Chr$(34), 0)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Wilson" <wi****@kingofprussia.com> wrote in message
news:WK******************@fe37.usenetserver.com...
I am trying to just create a simple Access form with buttons that will pop up different powerpoint presentations but recieve an 'Invalid procedure

call
or arguement' error when I try to run the ppt. Any ideas? Running both
Access and PPT 2000.

Here's the code I have:

Private Sub cmdTest_Click()
On Error GoTo Err_cmdTest_Click

Dim stAppName As String

stAppName = "C:\WINNT\Profiles\Desktop\AccessTest.ppt"
Call Shell(stAppName, 0)

Exit_cmdTest_Click:
Exit Sub

Err_cmdTest_Click:
MsgBox Err.Description
Resume Exit_cmdTest_Click

End Sub

Thanks in advance...
Matt



Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.