View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bert[_4_] Bert[_4_] is offline
external usenet poster
 
Posts: 11
Default Running a CommandButton in Excel I get this error

When I try to open Powerpoint using a commandbutton I get
a "Run-Time Error". Here's
the Code. Can someone help me with this, Thanks:


Private Sub CommandButton1_Click()
callppt

End Sub

Sub callppt()
x = Shell("C:\Program Files\Microsoft
Office\Office\POWERPNT.EXE")

Dim pptApp As Object
Set pptApp = CreateObject("Powerpoint.Application")
pptApp.Visible = True
pptApp.Presentations.Open
Filename:="U\DATA\POWER\Learning.ppt"