Jan 05
exporting value from PPT slide into Excel
xn--vcsx75gvhj1xc.comWondering 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
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
That's helped a lot! Very pleased.
Cheers
T
#If you have any other info about this subject , Please add it free.# |