• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Send data from Powerpoint to Excel

Visor

Member
Dear All,
Hello everyone
Powerpoint can be programmed with VBA, this have controls as Excel, then ..
It is possible to send data from Powerpoint to Excel?
if I put a textbox in unserform Powerpoint as as I can send it to an excel spreadsheet to excel serve Database?
if this can be what would be the code to be sent from a Powerpoint textbox to excel?
Thanks in advance
 
Hi ,

It may or may not be possible to send data from PowerPoint to Excel ; my question would be why ?

PP is presentation software , which implies that it is essentially an output system , which does not do much data manipulation or processing ; after all , if you want to use forms and input data for further processing , why develop an application in PP to accept data input and transfer it to Excel , when you can do the same in Excel itself ?

Narayan
 
Thanks for your answer
Because PPT ?. Because there I can make a test with interactive animations, and questions may be submitted want to excel, I wish I could do linking.
Because you can not do data processing, but excel if, then I send them to excel and bring them back when required.
Explain how:
I select a form questions (VBA PPT) from the database of Excel, for interactive test (preparation)
I have 20 students I have grouped the two teams A and B Slide 1: A: select a button type and complexity of the question
Slide2: displays the question and options. After selecting, Selecting the correct answer ....
Slide3: Correct !!! (Applause sound)
Opposite case
Slide 4: Wrong !!! (Sound donkey)
Team B then passes
Recurring events
Slide 5: Show results

The results are automatically sent to the database of Excel
How I can do this?
 
Dear NARAYANK991
If it isn't possible to send data, which would be at least a code from the macro ppt, make it open a particular file Excel????
Thanks
 
Dear Friends
I think the solution is only open the file
Can you telme how is to open Workbook excel macro from powerpoint macro??
only open file, that is join to powerpoint macro file.
 
Hi !​
Code:
    With CreateObject("Excel.Application")
        .Workbooks.Open "WorkbookFullPathHere"
        ' rest of VBA Excel code here
         .Quit
    End With
Do you like it ? So thanks to click on bottom right Like !
 
Thanks
I am sorry. I put the code in the macro ppt
I get :
upload_2015-8-21_9-37-51.png
mesage:
wrong 1004
was not found "C:....
 

Works like a breeze on my side with a valid workbook fullpathname !

So, you make a mistake on the workbook or
you are not granted to access it …

This demonstration checks if workbook exists :​
Code:
Sub Demo()
     Const WB = "WorkbookFullPathHere"
    If Dir(WB) = "" Then
        MsgBox "Workbook not exists !", vbExclamation
    Else
        With CreateObject("Excel.Application")
            .Workbooks.Open WB
            .Visible = True
            For L& = 0 To 999999:  DoEvents:  Next
            .Quit
        End With
    End If
End Sub
You like ? So thanks to …
 
Hi
I use Powerpoint 2010
I put the code suggested as follow:

Code:
Private Sub CommandButton1_Click()

Const WB = "C:\Users\Compu Mundo\Documents\PROGRAMACION\MyPowerPoinTs\BD EVAI.xls"
    If Dir(WB) = "" Then
        MsgBox "Workbook not exists !", vbExclamation
    Else
        With CreateObject("Excel.Application")
            .Workbooks.Open WB
            .Visible = True
            For L& = 0 To 999999:  DoEvents:  Next
            .Quit
        End With
    End If
End Sub

Wrong!!!

upload_2015-8-21_13-34-0.png

is necesario a Reference? o what powerpoint you are using?
upload_2015-8-21_13-37-48.png
Thanks
 

No necessita una referencia !

Dir function is not from PowerPoint but pure VBA (see its help !) :
so it's just an error in constant WB for workbook fullname !

Maybe you forgot the "x" character at end of workbook name …
 
Wonderful !!!
Now it works
In fact I was missing the "x"
Mr NARAYANK991, It can serve many forum friends
It was made by Hector Miguel (Ayuda Excel)
I've found a way to send data to excel using the following:
Code:
Private Sub sendDatatoEx()
  Set xlApp = CreateObject("excel.application")
  Set xlWbk = xlApp.Workbooks.Open(ActivePresentation.Path & "\bd evai.xlsx")
With xlWbk.Worksheets("Unid1") 'Name of sheet
  .Range("J" & Fila) = TbxRC
    '.Range("c2") = TextBox6
   
  End With
End Sub

Private Sub UserForm_Terminate()
  xlWbk.Close True
  xlApp.Quit ' cerramos la aplicacion (Excel)
  Set xlWbk = Nothing ' destroy objet of the book
  Set xlApp = Nothing ' destroy objet ofapplication
End Sub

So I have two issues solved
issue solved
Thank you Marc L
 
Back
Top