• Hi Folks,

    Wondering if anyone out there can help me with this one.
    I've designed a simple little test on PowerPoint for my pupils, that uses VBA to calculate their score. At the end, I have used this statement so that their results could be sent to me in JPG format.

    With Application.ActivePresentation.Slides(12)
    .Export "W:ICTICT GCSE ResourcesTest Results" & username & " Result", "JPG"
    End With

    This is not ideal as i have to open up different JPG files to see their scores. What I'm trying to do is to somehow, when they click on a command button ("Send"), their results will be sent to an EXCEL spreadsheet (And everyone's results will be on one spreadsheet!)

    I don't seem to have any success with this at the moment. Anyone out there able to help??

    Cheers,
    T


  • Maybe you could have the Results in a string and then write the string to a comma delimited text file (Which you can open directly in Excel)?

    This code would write the results to your file, new results would be ADDED.

    Sub WriteStringToFile()
    Dim strFileName As String
    Dim IFNum As Integer
    Dim strResult As String
    Dim username As String
    username = "John"
    strResult = username & ",12,3,45,6"
    strFileName = "W:ICTICT GCSE ResourcesTest_Results.txt"
    IFNum = FreeFile
    Open strFileName For Append As IFNum
    Print #IFNum, strResult
    Close IFNum
    End Sub

    You would need to adapt it slightly to pick up the username and results

    Hope it helps


  • Thanks John,

    That's helped a lot! Very pleased.

    Cheers

    T


  • Glad to help out. I guess you spotted this but ideally it would have been .csv not .txt







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about exporting value from PPT slide into Excel , Please add it free.