Results 1 to 3 of 3

Thread: Visual Basic Help (Using with PowerPoint)*****URGENT

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2014
    Posts
    1

    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

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,538

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    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
  •  



Click Here to Expand Forum to Full Width