I posted a rubbish question about this before and have gone away and done some work on it to re-ask. Basically I've made a ppt quiz that counts how many correct and incorrect answers a person has given. It then feeds this information back to the user at the end. However what I want to happen now is I want the results to be stored so that I can go back in and see how each user has performed in the quiz. Ideally I would like it to work over 6 networked computers storing all the quiz results in one place. But if need be I can just take a file from each of the 6 computers.
My code so far looks like this:
Dim username As String
Dim numberCorrect As Integer
Dim numberWrong As Integer
Sub YourName()
username = InputBox(prompt:="Type your Name")
MsgBox " Get Ready to begin " + username, vbApplicationModal, " Orange 1C Book 7"
End Sub
Sub correct()
numberCorrect = numberCorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub incorrect()
numberWrong = numberWrong + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Start()
numberCorrect = 0
numberWrong = 0
YourName
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Results()
MsgBox "Well done " & username & " You got " & numberCorrect & " out of " & numberCorrect + numberWrong, vbApplicationModal, "Orange 1C Book 7"
End Sub'
Any help would be greatly appreciated. Not sure where to begin with the next step.
Here goes one option for you... But some explanation first. This code will create TXT file. Each time someone will reach
Results
macro it will add results to the file. So, one file will keep all the results until you don't delete them (or the file). Therefore I've added separation line and date/time information for you to easily find appropriate results.You need to add
Save_Results_To_Txt
to yourResults
sub, possibly beforeMsgBox
line.Your results.txt file will look like: