Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use a button in Excel to call a file into Excel. Can I
use a button in excel to open up another Office application such as Powerpoint? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Yes, one way: Private Sub CommandButton1_Click() callppt End Sub Sub callppt() x = Shell("C:\Program Files\Microsoft Office\Office10 \POWERPNT.EXE") End Sub jeff -----Original Message----- I use a button in Excel to call a file into Excel. Can I use a button in excel to open up another Office application such as Powerpoint? . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jeff,
Thanks so much, it worked. I have another question. Can a powerpoint file be opened up thru this CommandButton in excel (First open up powerpoint then open up the file I need). Thanks, Bert -----Original Message----- Hi, Yes, one way: Private Sub CommandButton1_Click() callppt End Sub Sub callppt() x = Shell("C:\Program Files\Microsoft Office\Office10 \POWERPNT.EXE") End Sub jeff -----Original Message----- I use a button in Excel to call a file into Excel. Can I use a button in excel to open up another Office application such as Powerpoint? . . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure it can
Set pptApp = CreateObject(,"Powerpoint.Application") pptApp.V isible = True pptApp.Presentations.Open FileName:="c:\My Documents\pres1.ppt" -- HTH ------- Bob Phillips "Bert" wrote in message ... Jeff, Thanks so much, it worked. I have another question. Can a powerpoint file be opened up thru this CommandButton in excel (First open up powerpoint then open up the file I need). Thanks, Bert -----Original Message----- Hi, Yes, one way: Private Sub CommandButton1_Click() callppt End Sub Sub callppt() x = Shell("C:\Program Files\Microsoft Office\Office10 \POWERPNT.EXE") End Sub jeff -----Original Message----- I use a button in Excel to call a file into Excel. Can I use a button in excel to open up another Office application such as Powerpoint? . . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think a stray comma and a stray space crept in there.
Dim pptApp As Object Set pptApp = CreateObject("Powerpoint.Application") pptApp.Visible = True pptApp.Presentations.Open filename:="c:\My Documents\pres1.ppt" Bob Phillips wrote: Sure it can Set pptApp = CreateObject(,"Powerpoint.Application") pptApp.V isible = True pptApp.Presentations.Open FileName:="c:\My Documents\pres1.ppt" |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I try to run this I get a "Run-Time Error". Here's
the Code. Can you 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" -----Original Message----- I think a stray comma and a stray space crept in there. Dim pptApp As Object Set pptApp = CreateObject("Powerpoint.Application") pptApp.Visible = True pptApp.Presentations.Open filename:="c:\My Documents\pres1.ppt" Bob Phillips wrote: Sure it can Set pptApp = CreateObject(,"Powerpoint.Application") pptApp.V isible = True pptApp.Presentations.Open FileName:="c:\My Documents\pres1.ppt" . |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You don't need both the Shell and the CreateObject but I doubt that's
the source of the "Run-Time Error". It looks like you've split some of the original lines. Try the sub as below. Please note this is exactly 6 lines. '''''''''''' Sub callppt() Dim pptApp As Object Set pptApp = CreateObject("Powerpoint.Application") pptApp.Visible = True pptApp.Presentations.Open Filename:="U\DATA\POWER\Learning.ppt" End Sub '''''''''''' Bert wrote: When I try to run this I get a "Run-Time Error". Here's the Code. Can you 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" |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I put in the 6 lines as you suggested and when I run it
comes back with error "Powerpoint could not open file" -----Original Message----- You don't need both the Shell and the CreateObject but I doubt that's the source of the "Run-Time Error". It looks like you've split some of the original lines. Try the sub as below. Please note this is exactly 6 lines. '''''''''''' Sub callppt() Dim pptApp As Object Set pptApp = CreateObject("Powerpoint.Application") pptApp.Visible = True pptApp.Presentations.Open Filename:="U\DATA\POWER\Learning.ppt" End Sub '''''''''''' Bert wrote: When I try to run this I get a "Run-Time Error". Here's the Code. Can you 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" . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Having one form show another form's input? | New Users to Excel | |||
X button question | Excel Discussion (Misc queries) | |||
Problems with a Form's behaviour | Excel Programming | |||
A Form's Rowsourse Format | Excel Programming | |||
Pass Variables into Form's code | Excel Programming |