-
Jul 25th, 2014, 11:53 AM
#1
Thread Starter
New Member
Visual Basic Help (Using with PowerPoint)*****URGENT
I want to start by saying that I am VERY NEW at VB, I did some programming in the past but never VB. I have created a test in PowerPoint that generates a score at the end. What I now want to do is email that score to a specific email address and this is creating a challenge. I REALLY need some assistance as I have been working on this for the past three weeks and have been unsuccessful.
The code I am using now is:
im numCorrect As Integer
Dim numIncorrect As Integer
Dim userName As String
Sub GetStarted()
Initialize
YourName
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Initialize()
numCorrect = 0
numIncorrect = 0
End Sub
Sub YourName()
userName = InputBox("Type your name")
End Sub
Sub RightAnswer()
numCorrect = numCorrect + 1
MsgBox "You are doing well, " & userName
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub WrongAnswer()
numIncorrect = numIncorrect + 1
MsgBox "Try to do better next time, " & userName
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Feedback()
MsgBox "You got " & numCorrect & " out of " _
& numCorrect + numIncorrect & ", " & userName
email.Subject = "eLearning Results"
email.Body = "You got " & numCorrect & " out of " _
& numCorrect + numIncorrect & ", " & userName
End Sub
-
Jul 25th, 2014, 01:06 PM
#2
Re: Visual Basic Help (Using with PowerPoint)*****URGENT
Don't have an actual answer for you but just wanted to point out that if you're writing this in PowerPoint, then you need the VBA section. Currently you've posted in the VB.NET, which isn't going to work for you. I'll ask the mods to move it for you.
-tg
-
Jul 25th, 2014, 01:42 PM
#3
Re: Visual Basic Help (Using with PowerPoint)*****URGENT
Welcome to VBForums
Thread moved from the 'VB.Net' forum to the 'Office Development/VBA' forum.
(thanks for letting us know tg )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|