Forum

How to Open an Exce...
 
Notifications
Clear all

How to Open an Excel Spreadsheet using the VBA by Power Point

5 Posts
2 Users
0 Reactions
83 Views
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello everyone my name is Maurizio and I offer you my one last request before Christmas breaks.
And the question is this: On a slider Representation of Various Images created with Doc Power Poit alliltima joints picture I have included an Active button.
Then the Suao Inside I Posted this code:

Private Sub Cmd_Apri_File_Excel_Click ()
On Error Resume Next
Workbooks.Open FileName: = ThisWorkbook.Path & " Utilities Auguri.xls"
end Sub

You should press this button to open an Excel Spreadsheet.
Now my question is this: If I run this code on excel works Fine me, but in Power Point no, Why.
What changes Thanks to all those who want to help me out on this, Greetings from A.Maurizio

 
Posted : 22/12/2016 1:31 pm
(@db325)
Posts: 19
Active Member
 

What error message to you get when the code runs?

"ThisWorkbook" is only relevant when used in Excel VBA and would mean nothing to PowerPoint itself.

You would need to create the Excel Application object first before attempting to open a workbook.

 
Posted : 22/12/2016 6:50 pm
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello Derek Brown, first thank you for your intervention, then I must tell you that does not give me any error when I try to start it all.
and just it does not open anything.
In addition, the Excel file you want to open, and already within the Siotto Folder that does not derive my job the same and that the named (Utility) work.
That's all.

 
Posted : 23/12/2016 6:06 am
(@db325)
Posts: 19
Active Member
 

Make the "On Error ...." line a comment line.

I would then expect the "Workbooks.Open ...." line to generate an error.

You need to "Reference" the Excel Object before you can use Excel VBA commands.

 
Posted : 23/12/2016 3:00 pm
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello Derek Brown thanks for your Clarification about.
However, I wanted to open an Excel file from a Esequzione Screen in PowerPoint.
But after several failed attempts to pit, then I solved my problem by invoking the Power Point files from Excel files.
For here doing exactly Contrary to what I had asked.
Now everything works here at Marvel to consider this topic closed.
Thanks And Happy Holidays to all Members of this Forum Greetings from A.Maurizio

 
Posted : 25/12/2016 5:03 am
Share: