Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VB - Open .ppsx, save & close excel issue

Status
Not open for further replies.

DavidQ

Industrial
Oct 11, 2012
53

Hello Eng Tips,
Im writing a code to open a power point show, save & close excel workbook. I added the ActiveWorkbook.save before ActiveWorkbook.quit line because the program ask to save the file before close it. The issue I get with this code is that it dont open the pps just save & close excel, any advice?

Code:
Sub Open_PPS()
'
' Open_PPS Macro

    ActiveSheet.Shapes.Range(Array("Picture 17")).Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:= _
    "Presentation%20Show.ppsx#2. Slide2"
    ActiveWorkbook.save
    Application.Quit
End Sub

Best Regards
Microsft Office 2010
 
Replies continue below

Recommended for you

Hi David
As far as I can see you are just creating a hyperlink, not actually activating it.
When I record a double click on a hyperlink in a cell I get the following:
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Fore a shape:
Selection.ShapeRange.Item(1).Hyperlink.Follow NewWindow:=False, AddHistory:=True

You will need something like this (the second line should work for your program) before the ActiveWorkbook.save

Hope this helps
Jens
 
The reason that your macro doesn't open the PowerPoint is because it does nothing that would cause a PowerPoint to open.

Please explain what you want to accomplish.
 
I agree with MJ; you select an object and assign a hyperlink to a powerpoint to that object, and then you close the file.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Thanks all for your responses, Im still evaluating the use of the macro. My intent is to create a button/hyperlink that open an Excel file form a PPS and do the same (but closing Excel in the process) to go back to the same slide. Why do I need to do this?, simple to avoid interaction with the keyboard and set up others computers.

Best Regards.
 
Either there's a language barrier or just misunderstanding. When you open a hyperlink to an Excel file in Powerpoint, Powerpoint doesn't close, so there is no reason to have to reopen it. Furthermore, if it was closed for some reason, reopening it will not send you back to the hyperlink anyway.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
please explain what you want to do. Not how you think it should be done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor